Coconut Framework
beta
|
Define CNObject data structure. More...
Go to the source code of this file.
Classes | |
struct | CNObjectMethods |
Methods for CNObject. More... | |
struct | CNObject |
Root object. More... | |
Typedefs | |
typedef void(* | CNDeallocateObjectFuncRef )(struct CNObject *dst) |
Functions | |
static struct CNObject * | CNAllocateObject (size_t size, const struct CNObjectMethods *methods, struct CNResource *resource) |
Allocate object. More... | |
static void | CNRetainObject (struct CNObject *dst) |
Retain the object. More... | |
void | CNReleaseObject (struct CNObject *dst) |
Release the object. More... | |
static struct CNResource * | CNResourceOfObject (struct CNObject *src) |
Get resource for the object. More... | |
static struct CNObjectMethods * | CNMethodsOfObject (const struct CNObject *src) |
Get methods for the object. More... | |
static size_t | CNSizeOfObject (const struct CNObject *src) |
Get size of object. More... | |
Variables | |
static const unsigned long | CNReferenceCountForStaticObject = ((unsigned long) -1) |
Define CNObject data structure.
typedef void(* CNDeallocateObjectFuncRef)(struct CNObject *dst) |
Pointer of the function to deallocate object
|
static |
Allocate object.
obj | Allocated object |
NULL | Allocation failed |
size | Size of this object. Size will be defined by the subclass. |
methods | Methods for this object. It will be defind by the subclass. |
resource | Resouce for this object |
References CNAllocateData(), CNObject::methods, CNObject::referenceCount, CNObject::resource, and CNObject::sizeOfObject.
Referenced by CNAllocateTextElement().
|
inlinestatic |
Retain the object.
dst | Destination object |
References CNReferenceCountForStaticObject, and CNObject::referenceCount.
Referenced by CNAddObjectToArray(), CNAppendObjectToList(), CNInsertObjectToList(), CNPrependObjectToList(), CNRetainEdge(), CNRetainGraph(), CNRetainNode(), CNRetainString(), CNRetainTextElement(), CNSetObjectToArray(), CNSetObjectToDictionary(), and CNSetObjectToFixedObjectArray().
void CNReleaseObject | ( | struct CNObject * | dst | ) |
Release the object.
dst | Destination object |
Referenced by CNReleaseEdge(), CNReleaseGraph(), CNReleaseNode(), CNReleaseNumber(), CNReleaseString(), CNReleaseText(), CNReleaseTextElement(), CNSetObjectToArray(), and CNSetObjectToFixedObjectArray().
|
static |
Get resource for the object.
src | Source object |
References CNObject::resource.
Referenced by CNResourceOfEdge(), CNResourceOfGraph(), CNResourceOfNode(), and CNResourceOfText().
|
static |
Get methods for the object.
src | Source object |
References CNObject::methods.
Referenced by CNPrintEdge(), CNPrintNode(), and CNPrintTextElement().
|
inlinestatic |
Get size of object.
src | Source object |
References CNObject::sizeOfObject.
|
static |
The reference count for the static object. The context of the object which has this value for the reference count is NEVER released.
Referenced by CNRetainObject().