Concept. More...

#include <gconcept.h>

Inheritance diagram for GConcept:
[legend]

Public Member Functions

 GConcept (const GConcept &concept)
 
 GConcept (GSession *session, const R::RString &name, GConceptType *type)
 
 GConcept (GSession *session, size_t id, const R::RString &name, GConceptType *type, size_t idxdocs, size_t idxprofiles, size_t idxcommunities, size_t idxtopics, size_t idxclasses)
 
virtual R::RCString GetClassName (void) const
 
int Search (const GConcept &c) const
 
size_t HashCode (size_t max) const
 
GConceptTypeGetType (void) const
 
void SetId (size_t id)
 
size_t GetIndex (tObjType ObjType) const
 
void SetIndex (tObjType ObjType, size_t index)
 
void ClearIndex (tObjType type)
 
virtual void Clear (void)
 
virtual bool IsEmpty (void) const
 
virtual ~GConcept (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)
 

Protected Attributes

GConceptTypeType
 
size_t IndexDocs
 
size_t IndexProfiles
 
size_t IndexCommunities
 
size_t IndexTopics
 
size_t IndexClasses
 
- Protected Attributes inherited from GObject
GSessionSession
 
size_t Id
 
tObjType ObjType
 
R::RContainer< GStatement,
false, true > * 
Subjects
 
R::RContainer< GStatement,
false, false > * 
Predicates
 
R::RContainer< GStatement,
false, false > * 
Values
 
- Protected Attributes inherited from RObject
RString Name
 

Additional Inherited Members

- Static Public Member Functions inherited from GObject
static bool HasDesc (void)
 
static bool HasTree (void)
 

Detailed Description

Concept.

The GConcept class provides a representation for a generic concept. A concept is a "representation" of a given piece of knowledge.

Constructor & Destructor Documentation

GConcept ( const GConcept concept)

Copy constructor.

Parameters
conceptOriginal concept.
GConcept ( GSession session,
const R::RString name,
GConceptType type 
)

Constructor of a generic concept.

Parameters
sessionSession.
nameName of the concept.
typeType of the concept.
GConcept ( GSession session,
size_t  id,
const R::RString name,
GConceptType type,
size_t  idxdocs,
size_t  idxprofiles,
size_t  idxcommunities,
size_t  idxtopics,
size_t  idxclasses 
)

Constructor of a generic concept.

Parameters
sessionSession.
idIdentifier.
nameName of the concept.
typeType of the concept.
idxdocsIdentifier of the block the inverted file related to the documents.
idxprofilesIdentifier of the block the inverted file related to the profiles.
idxcommunitiesIdentifier of the block the inverted file related to the communities.
idxtopicsIdentifier of the block the inverted file related to the topics.
idxclassesIdentifier of the block the inverted file related to the classes.
virtual ~GConcept ( void  )
virtual

Destruct the concept.

Member Function Documentation

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

Reimplemented from GObject.

int Search ( const GConcept c) const

Compare two concepts using their names and their types.

Parameters
cConcept used.
Returns
-1,0 or +1 depending if the concept is "smaller", equals or is "higher" than the argument.
See also
R::RContainer
size_t HashCode ( size_t  max) const

Compute the hash code for a concept.

See also
R::RHashContainer
Parameters
maxMaximal size of the hash code.
GConceptType* GetType ( void  ) const

Get the type of the concept.

void SetId ( size_t  id)

Set the Identifier of the concept.

Parameters
idIdentifier.
size_t GetIndex ( tObjType  ObjType) const
Returns
the block index of the concept for a given object type.
Parameters
ObjTypeType of the reference.
void SetIndex ( tObjType  ObjType,
size_t  index 
)

Set the block index of the concept for a given object type.

Parameters
ObjTypeType of the reference.
indexIndex to set.
void ClearIndex ( tObjType  type)

Clear the block index of the concept for a given object type.

Parameters
ObjTypeType of the reference.
virtual void Clear ( void  )
virtual

Clear all the information of the concept.

virtual bool IsEmpty ( void  ) const
virtual

Test if the concept is considered as empty. By default, every concept defined by a non-empty name, is also considered as not empty.

Member Data Documentation

GConceptType* Type
protected

Type of the concept.

size_t IndexDocs
protected

Identifier of the block in the inverted file for the documents.

size_t IndexProfiles
protected

Identifier of the block in the inverted file for the profiles.

size_t IndexCommunities
protected

Identifier of the block in the inverted file for the communities.

size_t IndexTopics
protected

Identifier of the block in the inverted file for the topics.

size_t IndexClasses
protected

Identifier of the block in the inverted file for the classes.