45 #ifndef CCXX_OBJECT_H_ 46 #define CCXX_OBJECT_H_ 48 #ifndef CCXX_MISSING_H_ 52 #ifdef CCXX_NAMESPACES 94 virtual void *getObject(
void) = 0;
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;};
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 RefPointer()
Create an unattached pointer.
Definition: object.h:131
bool operator==(const MapObject *theObject) const
Comparison operator, between the MapIndex and a MapObject, useful to avoid casts for sake of clearnes...
Definition: object.h:548
unsigned count
Definition: object.h:341
void * operator->() const
Definition: object.h:155
void * operator*() const
Dereference operator: the pointed object it is returned as void * for easy re-cast.
Definition: object.h:506
void * getEnd()
Get table's end, useful for cycle control; it is returned as void * for easy re-cast.
Definition: object.h:423
#define __EXPORT
Definition: config.h:980
InsertMode
Requested in overloaded insert() method to indicate how to insert data into list. ...
Definition: object.h:253
substitute functions which may be missing in target platform libc.
LinkedDouble()
Definition: object.h:234
A map table allows for entities to be mapped (hash index) onto it.
Definition: object.h:335
LinkedSingle * getNext(void)
Get next object, for convenience.
Definition: object.h:207
unsigned getRange(void)
Return range of this table.
Definition: object.h:374
MapObject ** map
Definition: object.h:342
LinkedDouble * getPrev(void)
Get prev object in the list.
Definition: object.h:302
unsigned getSize(void)
Return the number of object stored in this table.
Definition: object.h:382
const char * idObject
Definition: object.h:569
void * operator*() const
Definition: object.h:152
RefObject * ref
Definition: object.h:108
Self managed double linked list object chain.
Definition: object.h:229
insert at first position in list pointed by current object
Definition: object.h:255
bool operator!=(const MapObject *theObject) const
Definition: object.h:551
LinkedDouble * prevObject
Definition: object.h:232
insert in list before current object
Definition: object.h:257
LinkedDouble * getNext(void)
Get next object, for convenience.
Definition: object.h:294
MapIndex()
Creates an empty map index (pointing to nothing).
Definition: object.h:481
A reference countable object.
Definition: object.h:66
The Mutex class is used to protect a section of code so that at any given time only a single thread c...
Definition: thread.h:186
The MapIndex allows linear access into a MapTable, that otherwise could have its elements being retri...
Definition: object.h:472
bool operator==(const MapIndex &theIndex) const
Comparison operator, between two MapIndex's.
Definition: object.h:536
Pointer to reference counted objects.
Definition: object.h:105
MapIndex operator++(int)
Postfix increment operator, to be used in loops and such.
Definition: object.h:528
bool operator!=(const MapIndex &theIndex) const
Definition: object.h:539
insert at last position in list pointed by current object
Definition: object.h:256
MapTable * table
Definition: object.h:570
unsigned range
Definition: object.h:340
Self managed single linked list object chain.
Definition: object.h:170
RefObject()
The constructor simply initializes the count.
Definition: object.h:76
MapIndex(MapObject *theObject)
Creates a map index pointing to a specific map object.
Definition: object.h:489
LinkedSingle * nextObject
Definition: object.h:173
MapObject * nextObject
Definition: object.h:568
MapIndex(const MapIndex &theIndex)
Creates a copy of a given map index.
Definition: object.h:497
The MapObject is a base class which can be used to make a derived class operate on a MapTable...
Definition: object.h:563
unsigned refCount
Definition: object.h:71
LinkedSingle()
Definition: object.h:175
class __EXPORT MapObject
Definition: object.h:56