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

#include <opentrep/bom/Levenshtein.hpp>

+ Inheritance diagram for OPENTREP::Levenshtein:

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 int getDistance (const std::string &iSource, const std::string &iTarget)
 

Detailed Description

Class aggregating utilities around the Levenshtein edit distance/error.

Definition at line 20 of file Levenshtein.hpp.

Member Function Documentation

int OPENTREP::Levenshtein::getDistance ( const std::string &  iSource,
const std::string &  iTarget 
)
static

Calculate the edit distance between two strings.

Definition at line 13 of file Levenshtein.cpp.

Referenced by OPENTREP::doesMatch().

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.


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