Main Page | Directories | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

moot::mootToken Class Reference

High-level token information object.

#include <mootToken.h>

List of all members.

Public Types

Public Member Functions

Public Attributes

Friends


Member Typedef Documentation

typedef list<Analysis> moot::mootToken::Analyses
 

Type for multiple concurrent analyses : tag => set<Analysis>

typedef float moot::mootToken::Cost
 

Type for analysis weights


Constructor & Destructor Documentation

moot::mootToken::mootToken mootTokenType  type = TokTypeVanilla  )  [inline]
 

Default constructor: empty text, no analyses

moot::mootToken::mootToken const mootTokString text,
mootTokenType  type = TokTypeVanilla
[inline]
 

Constructor given only token text: no analyses

moot::mootToken::mootToken const mootTokString text,
const Analyses analyses
[inline]
 

Constructor given text & analyses

moot::mootToken::mootToken const mootTokString text,
const Analyses analyses,
const mootTagString besttag
[inline]
 

Constructor given text & analyses & best tag

moot::mootToken::~mootToken void   )  [inline]
 

Constructor for text-only tokens from C buffer of known length


Member Function Documentation

const Analyses& moot::mootToken::analyses const Analyses analyses  )  [inline]
 

Set token analyses

const Analyses& moot::mootToken::analyses void   )  const [inline]
 

Get token analyses

mootTagString& moot::mootToken::besttag const mootTagString besttag  )  [inline]
 

Set best tag

const mootTagString& moot::mootToken::besttag void   )  const [inline]
 

Get best tag

mootTagString& moot::mootToken::besttagAppend const char *  s,
size_t  len
[inline]
 

Append to 'besttag' text, returns new text

mootTagString& moot::mootToken::besttagAppend const mootTagString text  )  [inline]
 

Append to 'besttag' text, returns new text

void moot::mootToken::clear void   )  [inline]
 

Clear this object (except for user_data)

void moot::mootToken::erase const Analysis analysis  )  [inline]
 

Remove an analysis

bool moot::mootToken::has_analysis_for_tag const mootTagString tag  )  const [inline]
 

Test presence of an analysis for 'tag'

void moot::mootToken::insert const char *  tag,
const char *  details
[inline]
 

Insert a new analysis, C-style

void moot::mootToken::insert const mootTagString tag,
const mootTagString details
[inline]
 

Insert a new analysis

void moot::mootToken::insert const Analysis analysis  )  [inline]
 

Insert an analysis

void moot::mootToken::prune void   )  [inline]
 

Prune analyses, retaining only those for 'besttag'

mootTokString& moot::mootToken::text const char *  s,
size_t  len
[inline]
 

Set token text

mootTokString& moot::mootToken::text const mootTokString text  )  [inline]
 

Set token text

const mootTokString& moot::mootToken::text void   )  const [inline]
 

Get token text

mootTokString& moot::mootToken::textAppend const char *  s,
size_t  len
[inline]
 

Append to token text, returns new token-text

mootTokString& moot::mootToken::textAppend const mootTokString text  )  [inline]
 

Append to token text, returns new token-text

void moot::mootToken::tokExport mootTokString dst_toktext = 0,
mootTagSet dst_tagset = 0,
bool  want_besttag_in_tagset = true
const [inline]
 

For lazy backwards-compatibility: convert mootToken back to old-style 'text,tagset' pair.

Parameters:
dst_toktext pointer to destination token-text. NULL (default) means don't export text.
dst_tagset pointer to destination tagset. NULL (default) means don't export tagset.
want_besttag_in_tagset whether to include besttag in exported tagset. Default=true.
Warning:
argument tagset is NOT cleared by this method.

void moot::mootToken::tokImport const mootTokString src_toktext = 0,
const mootTagSet src_tagset = 0
[inline]
 

For backwards-compatibility: convert old-style 'text,tags' pair to a mootToken.

Warning:
current analysis-set is NOT cleared by this method.

mootTokenType moot::mootToken::toktype const mootTokenType  type  )  [inline]
 

Set token type

mootTokenType moot::mootToken::toktype void   )  const [inline]
 

Get token type


Friends And Related Function Documentation

bool operator< const mootToken x,
const mootToken y
[friend]
 

Comparison operaor

bool operator== const mootToken x,
const mootToken y
[friend]
 

Equality operator


Member Data Documentation

Analyses moot::mootToken::tok_analyses
 

Set of possible analyses as a mootToken::AnalysisSet

mootTagString moot::mootToken::tok_besttag
 

Best tag for this token.

mootTokString moot::mootToken::tok_text
 

Literal token text.

mootTokenType moot::mootToken::tok_type
 

Token content type.


The documentation for this class was generated from the following file:
Generated on Mon Jun 27 13:05:28 2005 for libmoot by  doxygen 1.3.8-20040913