![]() |
Crossfire Resources Editor
|
Contains all information about licenses for faces. More...
#include <LicenseManager.h>
Collaboration diagram for LicenseManager:Public Types | |
| typedef std::pair< std::string, std::string > | LicenseItem |
| One line in a license file. More... | |
| typedef std::map< std::string, std::vector< LicenseItem > > | LicenseItems |
| For a single face, map between a faceset's prefix and the license items. More... | |
Public Member Functions | |
| std::map< std::string, LicenseItems > | getAll () const |
| Get all known license information. More... | |
| LicenseItems | getForFace (const std::string &face) |
| Get license information for a face. More... | |
| LicenseManager () | |
| Standard constructor. More... | |
| void | readLicense (BufferReader *reader, const char *filename) |
| Process a license file. More... | |
| void | reset () |
| Reset license information, before a reloading. More... | |
| virtual | ~LicenseManager () |
| Standard destructor. More... | |
Static Public Member Functions | |
| static std::string | licenseNameFromFaceName (const std::string &face, bool tryWall) |
| Get the expected license name from a face name. More... | |
| static void | parseLicenseFile (BufferReader *reader, const char *filename, std::vector< LicenseItem > &items) |
Private Attributes | |
| std::map< std::string, LicenseItems > | m_licenses |
| License information for all faces. More... | |
Contains all information about licenses for faces.
Definition at line 25 of file LicenseManager.h.
| typedef std::pair<std::string, std::string> LicenseManager::LicenseItem |
One line in a license file.
Definition at line 28 of file LicenseManager.h.
| typedef std::map<std::string, std::vector<LicenseItem> > LicenseManager::LicenseItems |
For a single face, map between a faceset's prefix and the license items.
Definition at line 29 of file LicenseManager.h.
| LicenseManager::LicenseManager | ( | ) |
Standard constructor.
Definition at line 19 of file LicenseManager.cpp.
|
virtual |
Standard destructor.
Definition at line 22 of file LicenseManager.cpp.
|
inline |
Get all known license information.
Definition at line 47 of file LicenseManager.h.
References m_licenses.
Referenced by CREMainWindow::onReportLicenses().
Here is the caller graph for this function:| LicenseManager::LicenseItems LicenseManager::getForFace | ( | const std::string & | face | ) |
Get license information for a face.
| face | face name, with the suffix. |
Definition at line 75 of file LicenseManager.cpp.
References licenseNameFromFaceName(), and m_licenses.
Referenced by CREFacePanel::updateItem().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Get the expected license name from a face name.
| face | face name, with the suffix. |
| tryWall | if true, then a trailing _[0-9A-F] from the name will be removed. |
Definition at line 85 of file LicenseManager.cpp.
Referenced by getForFace(), and CREMainWindow::onReportLicenses().
Here is the caller graph for this function:
|
static |
Definition at line 57 of file LicenseManager.cpp.
Referenced by readLicense(), and SoundFiles::refreshSounds().
Here is the caller graph for this function:| void LicenseManager::readLicense | ( | BufferReader * | reader, |
| const char * | filename | ||
| ) |
Process a license file.
| reader | source. |
| filename | full file name. |
Definition at line 25 of file LicenseManager.cpp.
References m_licenses, and parseLicenseFile().
Referenced by ResourcesManager::load().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Reset license information, before a reloading.
Definition at line 52 of file LicenseManager.h.
References m_licenses.
Referenced by CREMainWindow::onToolReloadAssets().
Here is the caller graph for this function:
|
private |
License information for all faces.
Definition at line 72 of file LicenseManager.h.
Referenced by getAll(), getForFace(), readLicense(), and reset().