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