Generic Vector Object. More...

#include <gdescriptionobject.h>

Inheritance diagram for GDescriptionObject< C >:
[legend]

List of all members.

Public Member Functions

 GDescriptionObject (GSession *session, size_t id, size_t blockid, tObjType objtype, const R::RString &name, tObjState state)
bool IsDefined (void) const
tObjState GetState (void) const
void SetState (tObjState state)
size_t GetId (void) const
void SetId (size_t id)
size_t GetBlockId (void) const
void Copy (GConcept *concept, const R::RContainer< GConceptRef, false, true > &list)
void Clear (bool disk=false)
void SaveDesc (void)
virtual ~GDescriptionObject (void)

Static Public Member Functions

static bool HasDesc (void)

Protected Member Functions

virtual bool LoadVectors (void)

Protected Attributes

tObjState State

Detailed Description

template<class C>
class GALILEI::GDescriptionObject< C >

Generic Vector Object.

The GDescriptionObject provides a generic class for a object of a given type with a specific identifier that is represented by a description.

Template Parameters:
CClass of the object.
Author:
Pascal Francq

Constructor & Destructor Documentation

GDescriptionObject ( GSession session,
size_t  id,
size_t  blockid,
tObjType  objtype,
const R::RString name,
tObjState  state 
)

Construct a object.

Parameters:
sessionSession.
idIdentifier of the object.
blockidIdentifier of the block.
objtypeObjType.
nameName of the object.
stateState of the object.
virtual ~GDescriptionObject ( void  ) [virtual]

Destruct the object.


Member Function Documentation

virtual bool LoadVectors ( void  ) [protected, virtual]

Load the vectors from the disk.

Returns:
true if the vectors was loaded.

Reimplemented from GDescription.

static bool HasDesc ( void  ) [static]

Defines if the objects have descriptions.

Returns:
true.

Reimplemented from GObject.

bool IsDefined ( void  ) const

Verify if the object has a description in memory or on the disk.

Returns:
true if the object is defined.

Reimplemented from GDescription.

tObjState GetState ( void  ) const
Returns:
the state of the object.
void SetState ( tObjState  state)

Set the state of the object. If the object must be delete, its vector is loaded to delete the references.

Parameters:
stateNew state.
size_t GetId ( void  ) const

Get the identifier of the document.

Reimplemented from GObject.

void SetId ( size_t  id)

Set the identifier of the document.

Parameters:
idIdentifier.

Reimplemented from GObject.

size_t GetBlockId ( void  ) const

Get the identifier of the block containing the description. If null, it means that the object is not defined.

Returns:
Identifier of the block.
void Copy ( GConcept concept,
const R::RContainer< GConceptRef, false, true > &  list 
)

Copy a list of object references to the object for a given concept.

Parameters:
conceptConcept
listList of concept references.

Reimplemented from GDescription.

void Clear ( bool  disk = false)

Clear the vectors corresponding to the object. The corresponding file is not removed from the disk.

Parameters:
diskClear the reference to the corresponding block on disk.
void SaveDesc ( void  )

Save the description of the object.


Member Data Documentation

tObjState State [protected]

State of the object.