OpenTREP Logo  0.07.18
C++ Open Travel Request Parsing Library
Loading...
Searching...
No Matches
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

◆ getDistance()

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().

◆ toStream()

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::PlaceHolder, OPENTREP::Result, OPENTREP::ResultCombination, OPENTREP::ResultHolder, and OPENTREP::World.

◆ fromStream()

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::PlaceHolder, OPENTREP::Result, OPENTREP::ResultCombination, OPENTREP::ResultHolder, and OPENTREP::World.

Referenced by operator>>().

◆ toString()

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

Get the serialised version of the Business Object.

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

◆ describeKey()

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::PlaceHolder, OPENTREP::Result, OPENTREP::ResultCombination, OPENTREP::ResultHolder, and OPENTREP::World.

◆ describeShortKey()

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::PlaceHolder, OPENTREP::Result, OPENTREP::ResultCombination, OPENTREP::ResultHolder, and OPENTREP::World.


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