Choco OS
V.0.16.9.0
Join to the chocolate world
|
Macros | |
#define | oC_OBJECTS_REGISTRATIONS_LIST(ADD_OBJECT) |
list of object registrations More... | |
#define | oC_ObjectId_(Name) oC_1WORD_FROM_2(oC_ObjectId_ , Name) |
returns name of the object id created for the object | |
Typedefs | |
typedef uint32_t | oC_ObjectControl_t |
stores object control value More... | |
Enumerations |
Functions | |
static oC_ObjectControl_t | oC_CountObjectControl (void *ObjectPointer, oC_ObjectId_t ObjectId) |
counts object control for object More... | |
static oC_ObjectId_t | oC_GetObjectId (oC_ObjectControl_t ObjectControl) |
returns id of object More... | |
static bool | oC_CheckObjectControl (void *ObjectPointer, oC_ObjectId_t ObjectId, oC_ObjectControl_t ObjectControl) |
checks if object control is correct More... | |
#define oC_OBJECTS_REGISTRATIONS_LIST | ( | ADD_OBJECT | ) |
The macro is for storing list of objects. To add object to the list just use macro ADD_OBJECT
in format:
ADD_OBJECT(ObjectName) \
Example:
Definition at line 63 of file oc_object.h.
typedef uint32_t oC_ObjectControl_t |
The type is for storing object control value. It should be included to the object structure.
Definition at line 141 of file oc_object.h.
enum oC_ObjectId_t |
Each object in the oC_OBJECTS_REGISTRATIONS_LIST list has assigned own ID number, that can be stored in this type.
Enumerator | |
---|---|
oC_OBJECTS_REGISTRATIONS_LIST |
oC_ObjectId_Thread oC_ObjectId_NumberOfElements |
oC_ObjectId_Mask |
oC_ObjectId_Mask |
Definition at line 122 of file oc_object.h.
|
inlinestatic |
The function is for checking if the object control value is correct for this object. It can be used for protection again usage of wrong pointers in the object functions.
ObjectPointer | Pointer to the object |
ObjectId | Id of the object |
ObjectControl | Object control value |
Definition at line 203 of file oc_object.h.
|
inlinestatic |
The function is for counting special key, that is assigned for each object for protection again wrong pointers given to object functions. Objects cannot be copied without recounting object control value. The function is not checking if the pointer is correct.
ObjectPointer | Pointer to the object |
ObjectId | Id of the object |
Definition at line 168 of file oc_object.h.
|
inlinestatic |
The function returns id of object stored in the object control value.
ObjectControl | Object control value |
Definition at line 184 of file oc_object.h.