30 typedef std::map<std::string, std::string> Map;
50 LangMap(
const std::string &path,
const std::string &filename);
57 LangMap(
const std::string &filename);
61 typedef Map::const_iterator const_iterator;
63 const_iterator begin() {
64 return langmap.begin();
67 const_iterator end() {
161 void reload(
const std::string &path,
const std::string &filename);
const std::string getMappedFileNameFromFileName(const std::string &fileName)
Tries to detect the corresponding lang file name, from the file name passed as parameter.
Definition: langmap.cpp:78
std::string path
the path for searching for the map file name
Definition: langmap.h:38
C++ class: doctemplate.h.
Definition: bufferedoutput.cpp:13
std::set< std::string > getMappedFileNames() const
Returns a set (i.e., an ordered list) of all the mapped lang file names of this map.
Definition: langmap.cpp:122
bool isOpen
whether the corresponding file is opened
Definition: langmap.h:35
A map stored in a file with the format key = elem.
Definition: langmap.h:29
LangMap(const std::string &path, const std::string &filename)
A LangMap object based on the passed map file (using the specified path).
Definition: langmap.cpp:35
void open()
Open the corresponding file (if it is not already opened) and read and parse its contents.
Definition: langmap.cpp:46
void reload(const std::string &path, const std::string &filename)
Reloads the contents of this map, using the (new) path and filename.
Definition: langmap.cpp:131
void print()
Prints the contents on the map to the standard output.
Definition: langmap.cpp:109
std::set< std::string > getLangNames() const
Returns a set (i.e., an ordered list) of all the lang names of this map.
Definition: langmap.cpp:114
const std::string getFileName(const std::string &lang)
Returns the lang file name corresponding to the passed language name.
Definition: langmap.h:96
std::string filename
the map file name
Definition: langmap.h:41
const std::string getMappedFileName(const std::string &lang)
Returns the lang file name corresponding to the passed language name.
Definition: langmap.cpp:71