Game Develop Core: gd::ResourcesMergingHelper Class Reference

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

- Main Page
- Modules
- Classes

- Class List
- Class Index
- Class Hierarchy

All Classes Files Functions Variables Typedefs Enumerations Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
gd::ResourcesMergingHelper Class Reference
IDE Classes ( Classes to be used to implement a development environment )

ResourcesMergingHelper is used ( mainly during compilation ) so as to inventory resources and change their filenames. More...

`#include <ResourcesMergingHelper.h>`

Inheritance diagram for gd::ResourcesMergingHelper:
[legend]

## Public Member Functions

void | SetBaseDirectory (const std::string &baseDirectory)
void | PreserveDirectoriesStructure (bool preserveDirectoriesStructure_=true)
| Set if the directories structure, starting from the base directory, must be preserved. More...
void | PreserveAbsoluteFilenames (bool preserveAbsoluteFilenames_=true)
| Set if the absolute filenames must be preserved.
std::map< std::string, std::string > & | GetAllResourcesOldAndNewFilename ()
virtual void | ExposeResource (std::string &resource)
virtual void | ExposeImage (std::string &imageName)
virtual void | ExposeShader (std::string &shaderName)

## Protected Attributes

std::map< std::string, std::string > | resourcesNewFilename
std::string | baseDirectory
bool | preserveDirectoriesStructure
| If set to true, the directory structure, starting from baseDirectory, will be preserved in filenames.
bool | preserveAbsoluteFilenames
| If set to true, the filenames which are absolute ( C:.png ) will not be transformed into their filenames ( MyFile.png ).

## Detailed Description

ResourcesMergingHelper is used ( mainly during compilation ) so as to inventory resources and change their filenames.

See Also
  ArbitraryResourceWorker

## Member Function Documentation

void gd::ResourcesMergingHelper::ExposeResource | ( | std::string & | resource) |  |

virtual

Resources merging helper collects all resources filenames and update these filenames.

Implements gd::ArbitraryResourceWorker.

std::map<std::string, std::string>& gd::ResourcesMergingHelper::GetAllResourcesOldAndNewFilename | ( | ) |  |

inline

Return a map containing the resources old absolute filename as key, and the resources new filenames as value. The new filenames are relative to the Base Directory.

void gd::ResourcesMergingHelper::PreserveDirectoriesStructure | ( | bool | preserveDirectoriesStructure_ = `true`) |  |

inline

Set if the directories structure, starting from the base directory, must be preserved.

For compilation in GD C++ Platform, all resources must be in a single folder, so that the directories structure is not preserved.

void gd::ResourcesMergingHelper::SetBaseDirectory | ( | const std::string & | baseDirectory) |  |

Set the directory used as base directory: All resources filename are relative to this directory. ( Usually, it is the project directory )

The documentation for this class was generated from the following files:

- ResourcesMergingHelper.h
- ResourcesMergingHelper.cpp