45 #ifndef COMMONCPP_OBJECT_H_ 46 #define COMMONCPP_OBJECT_H_ 48 #ifndef COMMONCPP_CONFIG_H_ 49 #include <commoncpp/config.h> 96 virtual void *getObject(
void) = 0;
121 virtual void enterLock(
void);
127 virtual void leaveLock(
void);
155 inline void *operator*()
const {
159 void *getObject(
void)
const;
161 operator bool()
const;
163 bool operator!()
const;
246 nextObject = prevObject = NULL;
251 virtual void enterLock(
void);
253 virtual void leaveLock(
void);
327 virtual void insert(
LinkedDouble& obj, InsertMode position = modeAtLast);
332 virtual void detach(
void);
384 virtual unsigned getIndex(
const char *
id);
411 void *getObject(
const char *
id);
524 return (
void*)thisObject;
547 return this->operator++();
556 return thisObject == theIndex.thisObject;
559 bool operator!=(
const MapIndex& theIndex)
const {
560 return !(*
this == theIndex);
570 return thisObject == theObject;
573 bool operator!=(
const MapObject* theObject)
const {
574 return !(*
this == theObject);
595 const char *idObject;
insert at first position in list pointed by current object
InsertMode
Requested in overloaded insert() method to indicate how to insert data into list. ...
MapIndex(MapObject *theObject)
Creates a map index pointing to a specific map object.
LinkedDouble * getNext(void)
Get next object, for convenience.
insert at last position in list pointed by current object
bool operator==(const MapObject *theObject) const
Comparison operator, between the MapIndex and a MapObject, useful to avoid casts for sake of clearnes...
LinkedDouble * getPrev(void)
Get prev object in the list.
LinkedSingle * getNext(void)
Get next object, for convenience.
MapIndex()
Creates an empty map index (pointing to nothing).
MapIndex(const MapIndex &theIndex)
Creates a copy of a given map index.
Self managed double linked list object chain.
A reference countable object.
MapIndex operator++(int)
Postfix increment operator, to be used in loops and such.
insert in list before current object
RefPointer()
Create an unattached pointer.
The MapIndex allows linear access into a MapTable, that otherwise could have its elements being retri...
unsigned getRange(void)
Return range of this table.
void * operator*() const
Dereference operator: the pointed object it is returned as void * for easy re-cast.
Self managed single linked list object chain.
void * getEnd()
Get table's end, useful for cycle control; it is returned as void * for easy re-cast.
A map table allows for entities to be mapped (hash index) onto it.
Pointer to reference counted objects.
The MapObject is a base class which can be used to make a derived class operate on a MapTable...
unsigned getSize(void)
Return the number of object stored in this table.
RefObject()
The constructor simply initializes the count.
bool operator==(const MapIndex &theIndex) const
Comparison operator, between two MapIndex's.