ddc
Public Member Functions | Public Attributes | List of all members
TxLang Class Reference

TxLang: abstract base class for language-dependent term expanders. More...

#include <TermExpander.h>

Inheritance diagram for TxLang:
Inheritance graph
[legend]
Collaboration diagram for TxLang:
Collaboration graph
[legend]

Public Member Functions

 TxLang (const string &cls=string("Lang"), const string &label=string("Lang"), const string &param=string("Generic"))
 param: language name supported by GetLanguageByString() More...
 
virtual ~TxLang (void)
 
virtual CTermExpanderclone (map< CTermExpander *, CTermExpander *> &xlate) const
 clone constructor to create a new expansion object (override this for derived classes) */ More...
 
virtual void setLanguage (MorphLanguageEnum lang)
 Set language by enum. Default just sets m_Lang=lang and m_Param=GetStringByLanguage(lang) More...
 
virtual void setLanguage (const string &lang)
 
- Public Member Functions inherited from CTermExpander
 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 ~CTermExpander (void)
 Default destructor. More...
 
virtual void compile (void)
 set up object based on label and/or parameter string; default implementation does nothing More...
 
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

MorphLanguageEnum m_Lang
 DDC-language to use for expansion. More...
 
- Public Attributes inherited from CTermExpander
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

TxLang: abstract base class for language-dependent term expanders.

Constructor & Destructor Documentation

◆ TxLang()

TxLang::TxLang ( const string &  cls = string("Lang"),
const string &  label = string("Lang"),
const string &  param = string("Generic") 
)

param: language name supported by GetLanguageByString()

References setLanguage().

Here is the call graph for this function:

◆ ~TxLang()

virtual TxLang::~TxLang ( void  )
inlinevirtual

Member Function Documentation

◆ clone()

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

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

Reimplemented from CTermExpander.

Reimplemented in TxCase, TxToUpper, TxToLower, and TxMorph.

◆ setLanguage() [1/2]

void TxLang::setLanguage ( MorphLanguageEnum  lang)
virtual

Set language by enum. Default just sets m_Lang=lang and m_Param=GetStringByLanguage(lang)

References GetStringByLanguage(), m_Lang, and CTermExpander::m_Param.

Referenced by setLanguage(), and TxLang().

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

◆ setLanguage() [2/2]

void TxLang::setLanguage ( const string &  lang)
virtual

Set language by string identifier using GetLanguageByString()

References errProcessMorphology, GetLanguageByString(), m_Lang, morphGeneric, morphUnknown, setLanguage(), and Trim().

Here is the call graph for this function:

Member Data Documentation

◆ m_Lang

MorphLanguageEnum TxLang::m_Lang

DDC-language to use for expansion.

Referenced by TxMorph::expand(), TxToLower::expand(), TxToUpper::expand(), TxCase::expand(), and setLanguage().


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