Game Develop Core: ResourcesMergingHelper.h Source File

| Game Develop Core Core library for developing platforms and tools compatible with Game Develop.

- Main Page
- Modules
- Classes

- File List
- File Members

All Classes Files Functions Variables Typedefs Enumerations Macros Groups Pages
ResourcesMergingHelper.h
Go to the documentation of this file.
1
6 #ifndef RESOURCESMERGINGHELPER_H
7 #define RESOURCESMERGINGHELPER_H
8
9 #include <string>
10 #include <vector>
11 #include <map>
12 #include <boost/shared_ptr.hpp>
13 #include "GDCore/IDE/ArbitraryResourceWorker.h"
14
15 namespace gd
16 {
17
26 class GD_CORE_API ResourcesMergingHelper : public ArbitraryResourceWorker
27 {
28 public:
29 ResourcesMergingHelper() : ArbitraryResourceWorker(), preserveDirectoriesStructure(false), preserveAbsoluteFilenames(false) {};
30 virtual ~ResourcesMergingHelper() {};
31
36 void SetBaseDirectory(const std::string & baseDirectory);
37
43 void PreserveDirectoriesStructure(bool preserveDirectoriesStructure_ = true) {preserveDirectoriesStructure = preserveDirectoriesStructure_;};
44
48 void PreserveAbsoluteFilenames(bool preserveAbsoluteFilenames_ = true) {preserveAbsoluteFilenames = preserveAbsoluteFilenames_;};
49
54 std::map<std::string, std::string> & GetAllResourcesOldAndNewFilename() { return resourcesNewFilename; };
55
59 virtual void ExposeResource(std::string & resource);
60
61 virtual void ExposeImage(std::string & imageName) {};
62 virtual void ExposeShader(std::string & shaderName) {};
63
64 protected:
65 std::map<std::string, std::string> resourcesNewFilename;
66 std::string baseDirectory;
67 bool preserveDirectoriesStructure;
68 bool preserveAbsoluteFilenames;
69 };
70
71 }
72
73 #endif // RESOURCESMERGINGHELPER_H
74
75
76
77
78
79
80