Concept Record. More...

#include <gconceptrecord.h>

Inheritance diagram for GConceptRecord:
[legend]

Public Member Functions

 GConceptRecord (void)
 
 GConceptRecord (const GConceptRecord &rec)
 
 GConceptRecord (size_t conceptid)
 
 GConceptRecord (tTokenType type, size_t conceptid, size_t synpos, size_t pos, size_t syndepth, size_t idx, size_t nbchildren)
 
int Compare (const GConceptRecord &node) const
 
tTokenType GetType (void) const
 
size_t GetConceptId (void) const
 
size_t GetSyntacticPos (void) const
 
size_t GetPos (void) const
 
size_t GetSyntacticDepth (void) const
 
size_t GetIndex (void) const
 
size_t GetNbChildren (void) const
 
GConceptRecordoperator= (const GConceptRecord &rec)
 
bool operator== (const GConceptRecord &rec) const
 
bool operator!= (const GConceptRecord &rec) const
 
void Clear (void)
 
void Print (void) const
 
virtual ~GConceptRecord (void)
 

Protected Attributes

tTokenType Type
 
size_t ConceptId
 
size_t SyntacticPos
 
size_t Pos
 
size_t SyntacticDepth
 
size_t Index
 
size_t NbChildren
 

Detailed Description

Concept Record.

The GConceptRecord provides a representation for a "concept record", i.a. an occurrence of a given concept in a given object (such as a document).

Constructor & Destructor Documentation

GConceptRecord ( void  )

Construct a concept node.

GConceptRecord ( const GConceptRecord rec)

Construct a concept node. Record.

GConceptRecord ( size_t  conceptid)

Construct a concept node.

Parameters
conceptidIdentifier of the concept.
GConceptRecord ( tTokenType  type,
size_t  conceptid,
size_t  synpos,
size_t  pos,
size_t  syndepth,
size_t  idx,
size_t  nbchildren 
)

Construct a concept node.

Parameters
typeType of the token.
conceptidIdentifier of the concept.
synposSyntactic position.
posPosition in the file.
syndepthSyntactic depth of the record.
idxIndex of the record.
nbchildrenNumber of children.
virtual ~GConceptRecord ( void  )
virtual

Destructor.

Member Function Documentation

int Compare ( const GConceptRecord node) const

Compare two nodes regarding their positions (first the syntactic one) and then their depths. The concept associated to the record is the last criteria used.

Parameters
nodeNode to compare with.
Returns
a number compatible with R::RContainer.
tTokenType GetType ( void  ) const
Returns
the type of the token corresponding to the node.
size_t GetConceptId ( void  ) const
Returns
the concept identifier.
size_t GetSyntacticPos ( void  ) const
Returns
the syntactic position in the file.
size_t GetPos ( void  ) const
Returns
the position in the file.
size_t GetSyntacticDepth ( void  ) const
Returns
the depth of the record.
size_t GetIndex ( void  ) const
Returns
the index of the node.
size_t GetNbChildren ( void  ) const
Returns
the number of child records.
GConceptRecord& operator= ( const GConceptRecord rec)

Assignment record.

Parameters
recRecord which contain will be assign.
Returns
the record assigned.
bool operator== ( const GConceptRecord rec) const

Equality operator. Each field must be identical (except the index).

Parameters
recRecord to compare with.
Returns
true if the two records are identical.
bool operator!= ( const GConceptRecord rec) const

Inequality operator. At least one field must be different (except the index).

Parameters
recRecord to compare with.
Returns
true if the two records are different.
void Clear ( void  )

Clear the information from the record.

void Print ( void  ) const

Simply print the node information on the screen;

Member Data Documentation

tTokenType Type
protected

Type of the token corresponding to the node.

size_t ConceptId
protected

Concept Identifier.

size_t SyntacticPos
protected

Syntactic position in the document.

size_t Pos
protected

Position in the document (in byte).

size_t SyntacticDepth
protected

Syntactic depth of the node.

size_t Index
protected

Index of the node.

size_t NbChildren
protected

Number of children records