Generic Vector Object. More...
#include <gdescriptionobject.h>
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:
-
C Class of the object.
Constructor & Destructor Documentation
| GDescriptionObject | ( | GSession * | session, |
| size_t | id, | ||
| size_t | blockid, | ||
| tObjType | objtype, | ||
| const R::RString & | name, | ||
| tObjState | state | ||
| ) |
Construct a object.
- Parameters:
-
session Session. id Identifier of the object. blockid Identifier of the block. objtype ObjType. name Name of the object. state State 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] |
| 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.
Set the state of the object. If the object must be delete, its vector is loaded to delete the references.
- Parameters:
-
state New state.
| void SetId | ( | size_t | id | ) |
| 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:
-
concept Concept list List 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:
-
disk Clear the reference to the corresponding block on disk.
| void SaveDesc | ( | void | ) |
Save the description of the object.