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

#include <opentrep/Names.hpp>

+ Inheritance diagram for OPENTREP::Names:

Public Member Functions

 Names (const LanguageCode_T &)
 
 Names (const Names &)
 
 ~Names ()
 
LanguageCode_T getLanguageCode () const
 
const NameList_TgetNameList () const
 
std::string getFirstName () const
 
void setLanguageCode (const LanguageCode_T &iLanguageCode)
 
void addName (const std::string &iName)
 
void resetList ()
 
void toStream (std::ostream &ioOut) const
 
void fromStream (std::istream &ioIn)
 
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.), in a given language.

Definition at line 26 of file Names.hpp.

Constructor & Destructor Documentation

OPENTREP::Names::Names ( const LanguageCode_T iLanguageCode)

Main constructor.

Definition at line 18 of file Names.cpp.

OPENTREP::Names::Names ( const Names iName)

Copy constructor.

Definition at line 23 of file Names.cpp.

OPENTREP::Names::~Names ( )

Destructor.

Definition at line 29 of file Names.cpp.

Member Function Documentation

LanguageCode_T OPENTREP::Names::getLanguageCode ( ) const
inline

Get the language code.

Definition at line 53 of file Names.hpp.

Referenced by OPENTREP::LocationExchange::exportLocation().

const NameList_T& OPENTREP::Names::getNameList ( ) const
inline
std::string OPENTREP::Names::getFirstName ( ) const

Get the first name of the list.

Note that it can be empty (when the list is itself empty).

Definition at line 33 of file Names.cpp.

void OPENTREP::Names::setLanguageCode ( const LanguageCode_T iLanguageCode)
inline

Set the language code.

Definition at line 77 of file Names.hpp.

void OPENTREP::Names::addName ( const std::string &  iName)

Add a name to the dedicated list.

Definition at line 89 of file Names.cpp.

Referenced by OPENTREP::NameMatrix::addName().

void OPENTREP::Names::resetList ( )

Reset the list of names to null (i.e., to an empty list).

Definition at line 94 of file Names.cpp.

void OPENTREP::Names::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 73 of file Names.cpp.

References describe().

void OPENTREP::Names::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 78 of file Names.cpp.

std::string OPENTREP::Names::toString ( ) const
virtual

Get the serialised version of the structure.

Implements OPENTREP::OPENTREP_Abstract.

Definition at line 82 of file Names.cpp.

References describe().

std::string OPENTREP::Names::describeKey ( ) const

Display the key of the structure.

Returns
std::string Dump of the structure.

Definition at line 44 of file Names.cpp.

Referenced by describe().

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

Display of the structure.

Returns
std::string Dump of the structure.

Definition at line 51 of file Names.cpp.

References describeKey().

Referenced by OPENTREP::NameMatrix::describe(), toStream(), and toString().


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