#include <opentrep/NameMatrix.hpp>
Public Member Functions | |
NameMatrix () | |
NameMatrix (const NameMatrix &) | |
~NameMatrix () | |
const NameMatrix_T & | getNameMatrix () const |
bool | getNameList (const LanguageCode_T &, NameList_T &) const |
void | addName (const LanguageCode_T &, const std::string &iName) |
void | reset () |
void | toStream (std::ostream &) const |
void | fromStream (std::istream &) |
std::string | toString () const |
std::string | describeKey () const |
std::string | describe () const |
Structure holding names for a BOM type (place, day, month, etc.), for a list of given languages.
Definition at line 22 of file NameMatrix.hpp.
OPENTREP::NameMatrix::NameMatrix | ( | ) |
Default constructor.
Definition at line 14 of file NameMatrix.cpp.
OPENTREP::NameMatrix::NameMatrix | ( | const NameMatrix & | iNameMatrix | ) |
Copy constructor.
Definition at line 18 of file NameMatrix.cpp.
OPENTREP::NameMatrix::~NameMatrix | ( | ) |
Destructor.
Definition at line 23 of file NameMatrix.cpp.
|
inline |
Get the map of name lists.
Definition at line 44 of file NameMatrix.hpp.
Referenced by OPENTREP::Place::buildIndexSets(), OPENTREP::LocationExchange::exportLocation(), and OPENTREP::BomJSONExport::jsonExportLocation().
bool OPENTREP::NameMatrix::getNameList | ( | const LanguageCode_T & | iLanguageCode, |
NameList_T & | ioNameList | ||
) | const |
Get, for a given language (code), the corresponding list of names.
const | LanguageCode_T& Language code. |
NameList_T& | Empty list of names, which will be filled by the method if a list exists for that language code. |
Definition at line 67 of file NameMatrix.cpp.
References OPENTREP::Names::getNameList().
Referenced by OPENTREP::Location::getNameList().
void OPENTREP::NameMatrix::addName | ( | const LanguageCode_T & | iLanguageCode, |
const std::string & | iName | ||
) |
Add a name for the place.
const | LanguageCode_T& Language in which to add the name. |
const | std::string& Name to be added. |
Definition at line 82 of file NameMatrix.cpp.
References OPENTREP::Names::addName(), and OPENTREP_LOG_ERROR.
Referenced by OPENTREP::Location::addName().
void OPENTREP::NameMatrix::reset | ( | ) |
Reset the map of name lists.
Definition at line 112 of file NameMatrix.cpp.
Referenced by OPENTREP::Location::resetMatrix().
|
virtual |
Dump a Business Object into an output stream.
ostream& | the output stream. |
Implements OPENTREP::OPENTREP_Abstract.
Definition at line 51 of file NameMatrix.cpp.
References describe().
|
virtual |
Read a Business Object from an input stream.
istream& | the input stream. |
Implements OPENTREP::OPENTREP_Abstract.
Definition at line 56 of file NameMatrix.cpp.
|
virtual |
Get the serialised version of the structure.
Implements OPENTREP::OPENTREP_Abstract.
Definition at line 60 of file NameMatrix.cpp.
References describe().
std::string OPENTREP::NameMatrix::describeKey | ( | ) | const |
Display the key of the structure.
Definition at line 27 of file NameMatrix.cpp.
Referenced by describe().
std::string OPENTREP::NameMatrix::describe | ( | ) | const |
Display of the structure.
Definition at line 33 of file NameMatrix.cpp.
References OPENTREP::Names::describe(), and describeKey().
Referenced by toStream(), toString(), and OPENTREP::Location::toString().