45 #ifndef CCXX_OBJECT_H_
46 #define CCXX_OBJECT_H_
48 #ifndef CCXX_MISSING_H_
52 #ifdef CCXX_NAMESPACES
119 virtual void enterLock(
void);
125 virtual void leaveLock(
void);
153 {
return getObject();};
156 {
return getObject();};
158 void *getObject(
void)
const;
160 bool operator!()
const;
176 {nextObject = NULL;};
208 {
return nextObject;};
235 {nextObject = prevObject = NULL;};
239 virtual void enterLock(
void);
241 virtual void leaveLock(
void);
295 {
return nextObject;};
303 {
return prevObject;};
313 virtual void insert(
LinkedDouble& obj, InsertMode position = modeAtLast);
318 virtual void detach(
void);
367 virtual unsigned getIndex(
const char *
id);
392 void *getObject(
const char *
id);
507 {
return (
void*)thisObject; }
529 {
return this->operator++(); }
537 {
return thisObject == theIndex.
thisObject; };
540 {
return !(*
this == theIndex); };
549 {
return thisObject == theObject; };
552 {
return !(*
this == theObject); };
587 #ifdef CCXX_NAMESPACES
LinkedDouble * getNext(void)
Get next object, for convenience.
InsertMode
Requested in overloaded insert() method to indicate how to insert data into list. ...
Self managed double linked list object chain.
bool operator==(const MapObject *theObject) const
Comparison operator, between the MapIndex and a MapObject, useful to avoid casts for sake of clearnes...
LinkedDouble * prevObject
bool operator!=(const MapIndex &theIndex) const
insert at first position in list pointed by current object
void * getEnd()
Get table's end, useful for cycle control; it is returned as void * for easy re-cast.
The MapIndex allows linear access into a MapTable, that otherwise could have its elements being retri...
LinkedSingle * getNext(void)
Get next object, for convenience.
A reference countable object.
Pointer to reference counted objects.
substitute functions which may be missing in target platform libc.
unsigned getSize(void)
Return the number of object stored in this table.
RefPointer()
Create an unattached pointer.
The Mutex class is used to protect a section of code so that at any given time only a single thread c...
insert at last position in list pointed by current object
void * operator->() const
LinkedDouble * getPrev(void)
Get prev object in the list.
void * getObject(void) const
LinkedSingle * nextObject
A map table allows for entities to be mapped (hash index) onto it.
The MapObject is a base class which can be used to make a derived class operate on a MapTable...
RefObject()
The constructor simply initializes the count.
MapIndex(const MapIndex &theIndex)
Creates a copy of a given map index.
MapIndex operator++(int)
Postfix increment operator, to be used in loops and such.
bool operator==(const MapIndex &theIndex) const
Comparison operator, between two MapIndex's.
void * operator*() const
Dereference operator: the pointed object it is returned as void * for easy re-cast.
Self managed single linked list object chain.
bool operator!=(const MapObject *theObject) const
MapIndex(MapObject *theObject)
Creates a map index pointing to a specific map object.
unsigned getRange(void)
Return range of this table.
MapIndex()
Creates an empty map index (pointing to nothing).
insert in list before current object