Concepts Class. More...

#include <gclass.h>

Inheritance diagram for GClass:

Public Member Functions

 GClass (GSession *session, const R::RString &name)
 GClass (GSession *session, size_t id, size_t blockid, const R::RString &name, const R::RDate &c)
virtual R::RCString GetClassName (void) const
int Compare (const GClass &theclass) const
R::RDate GetComputed (void) const
void Update (GDescription &desc)
virtual double GetUpOperationCost (void) const
virtual ~GClass (void)
- Public Member Functions inherited from GDescriptionObject< GClass >
 GDescriptionObject (GSession *session, size_t id, size_t blockid, tObjType objtype, const R::RString &name)
void ReleaseVectors (void)
const GDescriptionoperator() (void) const
R::RConstCursor< GVectorGetVectors (void) const
const GVectorGetVector (GConcept *metaconcept) const
bool IsIn (const GConcept *concept) const
bool IsDefined (void) const
tObjState GetState (void) const
size_t GetId (void) const
size_t GetBlockId (void) const
virtual ~GDescriptionObject (void)
- Public Member Functions inherited from GObject
 GObject (GSession *session, size_t id, const R::RString &name, tObjType type)
 GObject (const GObject &obj)
void VerifyStatements (tStatementElement what, size_t size)
int Compare (const GObject &obj) const
int Compare (size_t id) const
int Search (const GObject &obj) const
int Search (const R::RString &name) const
GSessionGetSession (void) const
size_t GetId (void) const
void SetId (size_t id)
tObjType GetObjType (void) const
R::RCursor< GStatementGetObjs (const GStatement *obj, tStatementElement what)
virtual void HandlerNotFound (const R::RNotification &notification)
virtual ~GObject (void)
- Public Member Functions inherited from RObject
 RObject (const RString &name=RString::Null)
int Compare (const RObject &obj) const
RString GetName (void) const
void PostNotification (const hNotification handle)
void PostNotification (const RCString &name)
void PostNotification (const hNotification handle, T data)
void PostNotification (const RCString &name, T data)
void InsertObserver (tNotificationHandler handler, const hNotification handle, RObject *object)
void InsertObserver (tNotificationHandler handler, const RCString &name, RObject *object)
void InsertObserver (tNotificationHandler handler, const hNotification handle)
void InsertObserver (tNotificationHandler handler, const RCString &name)
void InsertObserver (tNotificationHandler handler, RObject *object)
void InsertObserver (tNotificationHandler handler)
void DeleteObserver (void)
void DeleteObserver (const hNotification handle, RObject *object)
void DeleteObserver (const RCString &name, RObject *object)
hNotification GetNotificationHandle (const RCString &name) const
RCString GetNotificationName (const hNotification handle) const
virtual ~RObject (void)

Static Public Member Functions

static tObjType GetType (void)
- Static Public Member Functions inherited from GDescriptionObject< GClass >
static bool HasDesc (void)
- Static Public Member Functions inherited from GObject
static bool HasDesc (void)
static bool HasTree (void)

Private Member Functions

virtual void Clear (bool disk)

Private Attributes

R::RDate Computed

Additional Inherited Members

- Protected Member Functions inherited from GDescriptionObject< GClass >
virtual bool LoadVectors (void)
- Protected Attributes inherited from GDescriptionObject< GClass >
tObjState State
- Protected Attributes inherited from GObject
size_t Id
tObjType ObjType
R::RContainer< GStatement,
false, true > * 
R::RContainer< GStatement,
false, false > * 
R::RContainer< GStatement,
false, false > * 
- Protected Attributes inherited from RObject
RString Name

Detailed Description

Concepts Class.

The GClass provides a representation for a group of concepts. All the classes are part of tree.

Constructor & Destructor Documentation

GClass ( GSession session,
const R::RString name 

Construct a new class.

nameName of the class.
GClass ( GSession session,
size_t  id,
size_t  blockid,
const R::RString name,
const R::RDate c 

Construct a class with a specific identifier.

blockidIdentifier of the block.
nameName of the class.
cDate of the last computation.
virtual ~GClass ( void  )

Destruct the group.

Member Function Documentation

virtual R::RCString GetClassName ( void  ) const
the class name.

Reimplemented from GObject.

static tObjType GetType ( void  )

Give the type of the object.

virtual void Clear ( bool  disk)

Clear the class.

diskClear the reference to the corresponding block on disk.
int Compare ( const GClass theclass) const

Compare two classes by comparing their identifier.

See also
R::RDate GetComputed ( void  ) const

Get the date of the last analysis of the document.

the date.
void Update ( GDescription desc)

Update the representation of the class once a computation was done. The computed date and the status are updated.

If the class is an internal one, the following steps are done:

  • -# An 'hClasses[oeAboutToBeUpdated]' notification is send.
  1. The references are updated.
  2. Existing in memory description is replaced.
  3. If necessary, the class and its description are saved.
  4. An 'hClasses[oeUpdated]' notification is send.

If the topic is an external one, its description is replaced.

descDescription to assign.
The description is cleared by this method.
virtual double GetUpOperationCost ( void  ) const

Get the cost of an Up operation of the current node. The method adds a cost computed for each vector. The cost of one vector is :

  1. The number of concept references if the class has no parent.
  2. The difference of the number of concept references between the parent and the current class.

In their paper TreeRank: A Similarity Measure for Nearest Neighbor Searching in Phylogenetic Databases, Wang, Shan, Shasha and Piel define the up operation as the operation that moves a token from one node to its parent.

Cost of the up operation.

Member Data Documentation

R::RDate Computed

Date of last class computation.