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

Class wrapping utility functions to transform back and forth strings from and into a list of words. More...

#include <opentrep/bom/WordHolder.hpp>

+ Inheritance diagram for OPENTREP::WordHolder:

Public Member Functions

virtual void toStream (std::ostream &) const =0
 
virtual void fromStream (std::istream &)=0
 
virtual std::string toString () const =0
 
virtual std::string describeKey () const =0
 
virtual std::string describeShortKey () const =0
 

Static Public Member Functions

static void tokeniseStringIntoWordList (const TravelQuery_T &, WordList_T &)
 
static void tokeniseDocIntoWordList (const TravelQuery_T &, WordList_T &)
 
static std::string createStringFromWordList (const WordList_T &iWordList)
 

Friends

class FacWordHolder
 

Detailed Description

Class wrapping utility functions to transform back and forth strings from and into a list of words.

Definition at line 17 of file WordHolder.hpp.

Member Function Documentation

void OPENTREP::WordHolder::tokeniseStringIntoWordList ( const TravelQuery_T iPhrase,
WordList_T ioWordList 
)
static

Tokenise a string into a list of words (STL strings).

The Boost.Tokenizer library is used.

Definition at line 37 of file WordHolder.cpp.

References OPENTREP::AllSepatorList(), and OPENTREP::baseTokeniseStringIntoWordList().

Referenced by OPENTREP::addUnmatchedWord(), OPENTREP::Result::calculateCodeMatches(), and OPENTREP::Result::calculateCombinedWeights().

void OPENTREP::WordHolder::tokeniseDocIntoWordList ( const TravelQuery_T iPhrase,
WordList_T ioWordList 
)
static

Tokenise a Xapian document data into a list of words (STL strings).

The Boost.Tokenizer library is used.

Definition at line 44 of file WordHolder.cpp.

References OPENTREP::baseTokeniseStringIntoWordList(), and OPENTREP::DocSepatorList().

std::string OPENTREP::WordHolder::createStringFromWordList ( const WordList_T iWordList)
static

Serialise a list of words (STL strings) into a single (STL) string.

Definition at line 52 of file WordHolder.cpp.

virtual void OPENTREP::BomAbstract::toStream ( std::ostream &  ) const
pure virtualinherited

Dump a Business Object into an output stream.

Parameters
ostream&the output stream.

Implemented in OPENTREP::Place, OPENTREP::Result, OPENTREP::ResultCombination, OPENTREP::ResultHolder, OPENTREP::World, and OPENTREP::PlaceHolder.

virtual void OPENTREP::BomAbstract::fromStream ( std::istream &  )
pure virtualinherited

Read a Business Object from an input stream.

Parameters
istream&the input stream.

Implemented in OPENTREP::Place, OPENTREP::Result, OPENTREP::ResultCombination, OPENTREP::ResultHolder, OPENTREP::World, and OPENTREP::PlaceHolder.

Referenced by operator>>().

virtual std::string OPENTREP::BomAbstract::toString ( ) const
pure virtualinherited

Get the serialised version of the Business Object.

Implemented in OPENTREP::Place, OPENTREP::Result, OPENTREP::ResultCombination, OPENTREP::ResultHolder, OPENTREP::World, and OPENTREP::PlaceHolder.

virtual std::string OPENTREP::BomAbstract::describeKey ( ) const
pure virtualinherited

Get a string describing the whole key (differentiating two objects at any level).

Implemented in OPENTREP::Place, OPENTREP::Result, OPENTREP::ResultCombination, OPENTREP::ResultHolder, OPENTREP::PlaceHolder, and OPENTREP::World.

virtual std::string OPENTREP::BomAbstract::describeShortKey ( ) const
pure virtualinherited

Get a string describing the short key (differentiating two objects at the same level).

Implemented in OPENTREP::Place, OPENTREP::Result, OPENTREP::ResultCombination, OPENTREP::ResultHolder, OPENTREP::PlaceHolder, and OPENTREP::World.

Friends And Related Function Documentation

friend class FacWordHolder
friend

Definition at line 18 of file WordHolder.hpp.


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