#include <directoryresourcetypehandler.h>

Public Member Functions | ||||
| DirectoryResourceTypeHandler (const DataType &dataType, const std::string &masterFile, const std::string &masterExtension, const std::string &resourceDirectoryExtension, const std::string &resourceDescription, std::vector< std::string > alternateMasterFiles) | ||||
| virtual bool | HandlesFile (const std::string &path, dtUtil::FileType type) const | |||
| ||||
| virtual ResourceDescriptor | CreateResourceDescriptor (const std::string &category, const std::string &fileName) const | |||
| 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 | |||
| Import a resource into a project given the file, and the path. | ||||
| virtual void | RemoveResource (const std::string &resourcePath) const | |||
| removes a resource. | ||||
| virtual bool | ImportsDirectory () const | |||
| ||||
| virtual bool | ResourceIsDirectory () const | |||
| ||||
| virtual const std::string & | GetResourceDirectoryExtension () const | |||
| ||||
| virtual const std::map < std::string, std::string > & | GetFileFilters () const | |||
| ||||
| virtual const std::string & | GetTypeHandlerDescription () const | |||
| ||||
| virtual const DataType & | GetResourceType () const | |||
| ||||
Protected Member Functions | ||||
| virtual | ~DirectoryResourceTypeHandler () | |||
| dtDAL::DirectoryResourceTypeHandler::DirectoryResourceTypeHandler | ( | const DataType & | dataType, | |
| const std::string & | masterFile, | |||
| const std::string & | masterExtension, | |||
| const std::string & | resourceDirectoryExtension, | |||
| const std::string & | resourceDescription, | |||
| std::vector< std::string > | alternateMasterFiles | |||
| ) |
| dtDAL::DirectoryResourceTypeHandler::~DirectoryResourceTypeHandler | ( | ) | [protected, virtual] |
| bool dtDAL::DirectoryResourceTypeHandler::HandlesFile | ( | const std::string & | path, | |
| dtUtil::FileType | type | |||
| ) | const [virtual] |
| path | The full path to the file or directory to check. |
| type | The filetype, whether a directory or file. |
Implements dtDAL::ResourceTypeHandler.
| ResourceDescriptor dtDAL::DirectoryResourceTypeHandler::CreateResourceDescriptor | ( | const std::string & | category, | |
| const std::string & | fileName | |||
| ) | const [virtual] |
Creates a resource descriptor based on the path to the resource.
| category | the category of the resource. | |
| fileName | the name of the file. |
Implements dtDAL::ResourceTypeHandler.
| const std::string dtDAL::DirectoryResourceTypeHandler::ImportResourceToPath | ( | const std::string & | newName, | |
| const std::string & | srcPath, | |||
| const std::string & | destCategoryPath | |||
| ) | const [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. |
Implements dtDAL::ResourceTypeHandler.
| void dtDAL::DirectoryResourceTypeHandler::RemoveResource | ( | const std::string & | resourcePath | ) | const [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 |
Implements dtDAL::ResourceTypeHandler.
| virtual bool dtDAL::DirectoryResourceTypeHandler::ImportsDirectory | ( | ) | const [inline, virtual] |
| virtual bool dtDAL::DirectoryResourceTypeHandler::ResourceIsDirectory | ( | ) | const [inline, virtual] |
Rbody resources are imported into a directory to hold all of the files.
Implements dtDAL::ResourceTypeHandler.
| virtual const std::string& dtDAL::DirectoryResourceTypeHandler::GetResourceDirectoryExtension | ( | ) | const [inline, virtual] |
Implements dtDAL::ResourceTypeHandler.
| virtual const std::map<std::string, std::string>& dtDAL::DirectoryResourceTypeHandler::GetFileFilters | ( | ) | const [inline, virtual] |
Implements dtDAL::ResourceTypeHandler.
| virtual const std::string& dtDAL::DirectoryResourceTypeHandler::GetTypeHandlerDescription | ( | ) | const [inline, virtual] |
This is set in the constructor.
Implements dtDAL::ResourceTypeHandler.
| virtual const DataType& dtDAL::DirectoryResourceTypeHandler::GetResourceType | ( | ) | const [inline, virtual] |