Concept. More...
#include <gconcept.h>
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 |
GConceptType * | GetType (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 |
GSession * | GetSession (void) const |
size_t | GetId (void) const |
void | SetId (size_t id) |
tObjType | GetObjType (void) const |
R::RCursor< GStatement > | GetObjs (const GStatement *obj, tStatementElement what) |
virtual void | HandlerNotFound (const R::RNotification ¬ification) |
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 | |
GConceptType * | Type |
size_t | IndexDocs |
size_t | IndexProfiles |
size_t | IndexCommunities |
size_t | IndexTopics |
size_t | IndexClasses |
Protected Attributes inherited from GObject | |
GSession * | Session |
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 | ( | GSession * | session, |
const R::RString & | name, | ||
GConceptType * | type | ||
) |
Constructor of a generic concept.
- Parameters
-
session Session. name Name of the concept. type Type 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
-
session Session. id Identifier. name Name of the concept. type Type of the concept. idxdocs Identifier of the block the inverted file related to the documents. idxprofiles Identifier of the block the inverted file related to the profiles. idxcommunities Identifier of the block the inverted file related to the communities. idxtopics Identifier of the block the inverted file related to the topics. idxclasses Identifier of the block the inverted file related to the classes.
|
virtual |
Destruct the concept.
Member Function Documentation
|
virtual |
- Returns
- the class name.
Reimplemented from GObject.
int Search | ( | const GConcept & | c | ) | const |
Compare two concepts using their names and their types.
- Parameters
-
c Concept 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
-
max Maximal 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
-
id Identifier.
size_t GetIndex | ( | tObjType | ObjType | ) | const |
- Returns
- the block index of the concept for a given object type.
- Parameters
-
ObjType Type of the reference.
void SetIndex | ( | tObjType | ObjType, |
size_t | index | ||
) |
Set the block index of the concept for a given object type.
- Parameters
-
ObjType Type of the reference. index Index to set.
void ClearIndex | ( | tObjType | type | ) |
Clear the block index of the concept for a given object type.
- Parameters
-
ObjType Type of the reference.
|
virtual |
Clear all the information of the concept.
|
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
|
protected |
Type of the concept.
|
protected |
Identifier of the block in the inverted file for the documents.
|
protected |
Identifier of the block in the inverted file for the profiles.
|
protected |
Identifier of the block in the inverted file for the communities.
|
protected |
Identifier of the block in the inverted file for the topics.
|
protected |
Identifier of the block in the inverted file for the classes.