Concept Reference. More...

#include <gconceptref.h>

Public Member Functions

 GConceptRef (GConcept *concept)
 
 GConceptRef (GConcept *concept, double w)
 
 GConceptRef (const GConceptRef &ref)
 
int Compare (const GConceptRef &ref) const
 
int Compare (const GConcept &concept) const
 
int Compare (const GConcept *concept) const
 
size_t GetId (void) const
 
GConceptGetConcept (void) const
 
GConceptTypeGetType (void) const
 
size_t GetTypeId (void) const
 
double GetWeight (void) const
 
void SetWeight (double w)
 
GConceptRefoperator= (const GConceptRef &ref)
 
GConceptRefoperator+= (double w)
 
GConceptRefoperator-= (double w)
 
GConceptRefoperator*= (double w)
 
GConceptRefoperator/= (double w)
 
virtual ~GConceptRef (void)
 

Protected Attributes

GConceptConcept
 
double Weight
 

Detailed Description

Concept Reference.

The GConceptRef class provides a representation for reference of a given concept in a vector. In practice, it is composed from a concept and an associated weight.

Constructor & Destructor Documentation

GConceptRef ( GConcept concept)

Constructor of a concept reference.

Parameters
conceptConcept.
GConceptRef ( GConcept concept,
double  w 
)

Constructor of a concept reference.

Parameters
conceptConcept.
wWeight associated with the reference.
GConceptRef ( const GConceptRef ref)

Copy constructor of a concept reference.

Parameters
refConcept reference.
virtual ~GConceptRef ( void  )
virtual

Destructor of a concept reference.

Member Function Documentation

int Compare ( const GConceptRef ref) const

Compare two concept references related to their concept.

See also
R::RContainer
Parameters
refConcept reference.
Returns
int
int Compare ( const GConcept concept) const

Compare a concept reference and a concept.

See also
R::RContainer
Parameters
conceptConcept.
Returns
int
int Compare ( const GConcept concept) const

Compare a concept reference and a concept.

See also
R::RContainer
Parameters
conceptConcept.
Returns
int
size_t GetId ( void  ) const

Get the identifier of the concept.

GConcept* GetConcept ( void  ) const

Get the concept.

GConceptType* GetType ( void  ) const

Get the type of the concept.

size_t GetTypeId ( void  ) const

Get the identifier of the type of the concept.

double GetWeight ( void  ) const

Get the weight of the concept reference.

Returns
Weight as double.
void SetWeight ( double  w)

Set the weight of the concept reference.

Parameters
wWeight.
GConceptRef& operator= ( const GConceptRef ref)

Assignment operator for concept references.

Parameters
refConcept reference.
GConceptRef& operator+= ( double  w)

Add a weight to the current one.

Parameters
wWeight to add.
GConceptRef& operator-= ( double  w)

Subtract a weight to the current one.

Parameters
wWeight to subtract.
GConceptRef& operator*= ( double  w)

Multiply a weight to the current one.

Parameters
wWeight to multiply.
GConceptRef& operator/= ( double  w)

Divide a weight to the current one.

Parameters
wWeight to divide.

Member Data Documentation

GConcept* Concept
protected

Concept.

double Weight
protected

Weight associated with the concept.