 |
Crossfire Resources Editor
|
Go to the documentation of this file.
13 #ifndef LICENSEMANAGER_H
14 #define LICENSEMANAGER_H
29 typedef std::map<std::string, std::vector<LicenseItem>>
LicenseItems;
59 void readLicense(BufferReader *reader,
const char *filename);
69 static void parseLicenseFile(BufferReader *reader,
const char *filename, std::vector<LicenseItem> &items);
std::map< std::string, LicenseItems > m_licenses
License information for all faces.
static std::string licenseNameFromFaceName(const std::string &face, bool tryWall)
Get the expected license name from a face name.
void reset()
Reset license information, before a reloading.
std::map< std::string, std::vector< LicenseItem > > LicenseItems
For a single face, map between a faceset's prefix and the license items.
LicenseManager()
Standard constructor.
void readLicense(BufferReader *reader, const char *filename)
Process a license file.
virtual ~LicenseManager()
Standard destructor.
LicenseItems getForFace(const std::string &face)
Get license information for a face.
std::pair< std::string, std::string > LicenseItem
One line in a license file.
Contains all information about licenses for faces.
static void parseLicenseFile(BufferReader *reader, const char *filename, std::vector< LicenseItem > &items)
std::map< std::string, LicenseItems > getAll() const
Get all known license information.