ddc
Public Attributes | List of all members
CTermExpander Class Reference

Abstract API for term-expansion modules (e.g. thesauri, morphologies, equivalence maps, ...) More...

#include <TermExpander.h>

Inheritance diagram for CTermExpander:
Inheritance graph
[legend]

Public Member Functions

Constructors etc.
 CTermExpander (const string &cls, const string &label, const string &param)
 Full constructor (abstract base classes only) More...
 
 CTermExpander (const string &label=string("NoLabel"), const string &param=string(""))
 Default constructor, to be overridden by subclasses. More...
 
virtual CTermExpandermapClone (map< CTermExpander *, CTermExpander *> &xlate) const
 clone constructor, handles sub-object cloning according to xlate map */ More...
 
virtual CTermExpanderclone (map< CTermExpander *, CTermExpander *> &xlate) const
 clone constructor to create a new expansion object (override this for derived classes) */ More...
 
virtual ~CTermExpander (void)
 Default destructor. More...
 
virtual void compile (void)
 set up object based on label and/or parameter string; default implementation does nothing More...
 
API
virtual string configString (void) const
 String form of this expander. Default is m_Class + " " + m_Label + " " + m_Param. More...
 
virtual void expand (const string &src, set< string > &dst)
 Expand a single term term to a set of terms dst. More...
 
virtual void expand (const set< string > &src, set< string > &dst)
 Expand a set of terms src to a set of terms dst. More...
 

Public Attributes

string m_Class
 class name for this expander More...
 
string m_Label
 unique name for this expander More...
 
string m_Param
 string argument(s) for this expander (parameters, for stringification) More...
 

Detailed Description

Abstract API for term-expansion modules (e.g. thesauri, morphologies, equivalence maps, ...)

Constructor & Destructor Documentation

◆ CTermExpander() [1/2]

CTermExpander::CTermExpander ( const string &  cls,
const string &  label,
const string &  param 
)
inline

Full constructor (abstract base classes only)

Referenced by clone().

Here is the caller graph for this function:

◆ CTermExpander() [2/2]

CTermExpander::CTermExpander ( const string &  label = string("NoLabel"),
const string &  param = string("") 
)
inline

Default constructor, to be overridden by subclasses.

References mapClone().

Here is the call graph for this function:

◆ ~CTermExpander()

virtual CTermExpander::~CTermExpander ( void  )
inlinevirtual

Default destructor.

Member Function Documentation

◆ mapClone()

CTermExpander * CTermExpander::mapClone ( map< CTermExpander *, CTermExpander *> &  xlate) const
virtual

clone constructor, handles sub-object cloning according to xlate map */

References clone().

Referenced by CTermExpander().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clone()

virtual CTermExpander* CTermExpander::clone ( map< CTermExpander *, CTermExpander *> &  xlate) const
inlinevirtual

clone constructor to create a new expansion object (override this for derived classes) */

Reimplemented in TxCabMap, TxCab, TxCurl, TxCase, TxToUpper, TxToLower, TxMorph, TxLang, TxChain, and TxId.

References CTermExpander().

Referenced by mapClone(), TxChain::TxChain(), TxCab::~TxCab(), TxCabMap::~TxCabMap(), and TxCurl::~TxCurl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compile()

virtual void CTermExpander::compile ( void  )
inlinevirtual

set up object based on label and/or parameter string; default implementation does nothing

Reimplemented in TxCab, and TxCurl.

References configString(), and expand().

Referenced by BxTermWrapper::compile(), TxDispatcher::ensureDefaultExpanders(), TxCab::~TxCab(), and TxCurl::~TxCurl().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ configString()

string CTermExpander::configString ( void  ) const
virtual

String form of this expander. Default is m_Class + " " + m_Label + " " + m_Param.

References m_Class, m_Label, and m_Param.

Referenced by compile(), TxDispatcher::configString(), and TxDispatcher::ensureDefaultExpanders().

Here is the caller graph for this function:

◆ expand() [1/2]

void CTermExpander::expand ( const string &  src,
set< string > &  dst 
)
virtual

Expand a single term term to a set of terms dst.

Referenced by TxId::clone(), TxMorph::clone(), TxToLower::clone(), TxToUpper::clone(), TxCase::clone(), compile(), BxTermWrapper::expand(), TxCab::~TxCab(), and TxChain::~TxChain().

Here is the caller graph for this function:

◆ expand() [2/2]

void CTermExpander::expand ( const set< string > &  src,
set< string > &  dst 
)
virtual

Expand a set of terms src to a set of terms dst.

Reimplemented in TxCab, TxCase, TxToUpper, TxToLower, TxMorph, TxChain, and TxId.

References errOther, m_Class, and m_Label.

Member Data Documentation

◆ m_Class

string CTermExpander::m_Class

◆ m_Label

string CTermExpander::m_Label

◆ m_Param

string CTermExpander::m_Param

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