OpenTREP Logo  0.6.0
C++ Open Travel Request Parsing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
OPENTREP::NameMatrix Struct Reference

#include <opentrep/NameMatrix.hpp>

+ Inheritance diagram for OPENTREP::NameMatrix:

Public Member Functions

 NameMatrix ()
 
 NameMatrix (const NameMatrix &)
 
 ~NameMatrix ()
 
const NameMatrix_TgetNameMatrix () 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
 

Detailed Description

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.

Constructor & Destructor Documentation

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.

Member Function Documentation

const NameMatrix_T& OPENTREP::NameMatrix::getNameMatrix ( ) const
inline
bool OPENTREP::NameMatrix::getNameList ( const LanguageCode_T iLanguageCode,
NameList_T ioNameList 
) const

Get, for a given language (code), the corresponding list of names.

Parameters
constLanguageCode_T& Language code.
NameList_T&Empty list of names, which will be filled by the method if a list exists for that language code.
Returns
bool Whether or not such a list exists for the given language.

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.

Parameters
constLanguageCode_T& Language in which to add the name.
conststd::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().

void OPENTREP::NameMatrix::toStream ( std::ostream &  ioOut) const
virtual

Dump a Business Object into an output stream.

Parameters
ostream&the output stream.

Implements OPENTREP::OPENTREP_Abstract.

Definition at line 51 of file NameMatrix.cpp.

References describe().

void OPENTREP::NameMatrix::fromStream ( std::istream &  ioIn)
virtual

Read a Business Object from an input stream.

Parameters
istream&the input stream.

Implements OPENTREP::OPENTREP_Abstract.

Definition at line 56 of file NameMatrix.cpp.

std::string OPENTREP::NameMatrix::toString ( ) const
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.

Returns
std::string Dump of the structure.

Definition at line 27 of file NameMatrix.cpp.

Referenced by describe().

std::string OPENTREP::NameMatrix::describe ( ) const

Display of the structure.

Returns
std::string Dump 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().


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