#include <resourcehelper.h>

Public Member Functions | |
| ResourceTypeHandler () | |
| virtual bool | HandlesFile (const std::string &path, dtUtil::FileType type) const =0 |
| |
| virtual ResourceDescriptor | CreateResourceDescriptor (const std::string &category, const std::string &fileName) const =0 |
| Creates a resource descriptor based on the path to the resource. | |
| virtual const std::string | ImportResourceToPath (const std::string &newName, const std::string &srcPath, const std::string &destCategoryPath) const =0 |
| Import a resource into a project given the file, and the path. | |
| virtual void | RemoveResource (const std::string &resourcePath) const =0 |
| removes a resource. | |
| virtual bool | ImportsDirectory () const =0 |
| |
| virtual bool | ResourceIsDirectory () const =0 |
| |
| virtual const std::string & | GetResourceDirectoryExtension () const =0 |
| |
| virtual const std::map < std::string, std::string > & | GetFileFilters () const =0 |
| |
| virtual const std::string & | GetTypeHandlerDescription () const =0 |
| |
| virtual const DataType & | GetResourceType () const =0 |
| |
Protected Member Functions | |
| virtual | ~ResourceTypeHandler () |
| dtDAL::ResourceTypeHandler::ResourceTypeHandler | ( | ) | [inline] |
| virtual dtDAL::ResourceTypeHandler::~ResourceTypeHandler | ( | ) | [inline, protected, virtual] |
| virtual bool dtDAL::ResourceTypeHandler::HandlesFile | ( | const std::string & | path, | |
| dtUtil::FileType | type | |||
| ) | const [pure virtual] |
| path | The full path to the file or directory to check. | |
| type | The filetype, whether a directory or file. |
Implemented in dtDAL::DirectoryResourceTypeHandler, and dtDAL::RBodyResourceTypeHandler.
| virtual ResourceDescriptor dtDAL::ResourceTypeHandler::CreateResourceDescriptor | ( | const std::string & | category, | |
| const std::string & | fileName | |||
| ) | const [pure virtual] |
Creates a resource descriptor based on the path to the resource.
| category | the category of the resource. | |
| fileName | the name of the file. |
Implemented in dtDAL::DirectoryResourceTypeHandler, and dtDAL::RBodyResourceTypeHandler.
| virtual const std::string dtDAL::ResourceTypeHandler::ImportResourceToPath | ( | const std::string & | newName, | |
| const std::string & | srcPath, | |||
| const std::string & | destCategoryPath | |||
| ) | const [pure virtual] |
Import a resource into a project given the file, and the path.
The path can be retrieved by calling ResourceHelper.createResourceCategory
| newName | the name to give the resource. This should not include the extension. | |
| srcPath | the path to the file or directory to import | |
| destCategoryPath | the full path to the destination. This must exist already. |
| ExceptionEnum::ProjectFileNotFound | if source of destination files do not exist. | |
| ExceptionEnum::ProjectIOException | if an error occurs copying the data. |
Implemented in dtDAL::DirectoryResourceTypeHandler, and dtDAL::RBodyResourceTypeHandler.
| virtual void dtDAL::ResourceTypeHandler::RemoveResource | ( | const std::string & | resourcePath | ) | const [pure virtual] |
removes a resource.
The current directory will be the root of the project when this is called.
| resourcePath | path to the file the file getResourcePath returns |
Implemented in dtDAL::DirectoryResourceTypeHandler, and dtDAL::RBodyResourceTypeHandler.
| virtual bool dtDAL::ResourceTypeHandler::ImportsDirectory | ( | ) | const [pure virtual] |
Implemented in dtDAL::DirectoryResourceTypeHandler, and dtDAL::RBodyResourceTypeHandler.
| virtual bool dtDAL::ResourceTypeHandler::ResourceIsDirectory | ( | ) | const [pure virtual] |
Implemented in dtDAL::DirectoryResourceTypeHandler, and dtDAL::RBodyResourceTypeHandler.
| virtual const std::string& dtDAL::ResourceTypeHandler::GetResourceDirectoryExtension | ( | ) | const [pure virtual] |
Implemented in dtDAL::DirectoryResourceTypeHandler, and dtDAL::RBodyResourceTypeHandler.
| virtual const std::map<std::string, std::string>& dtDAL::ResourceTypeHandler::GetFileFilters | ( | ) | const [pure virtual] |
Implemented in dtDAL::DirectoryResourceTypeHandler, and dtDAL::RBodyResourceTypeHandler.
| virtual const std::string& dtDAL::ResourceTypeHandler::GetTypeHandlerDescription | ( | ) | const [pure virtual] |
Implemented in dtDAL::DirectoryResourceTypeHandler, and dtDAL::RBodyResourceTypeHandler.
| virtual const DataType& dtDAL::ResourceTypeHandler::GetResourceType | ( | ) | const [pure virtual] |
Implemented in dtDAL::DirectoryResourceTypeHandler, and dtDAL::RBodyResourceTypeHandler.