Data Structures | |
| struct | orxSTRUCTURE |
Defines | |
| #define | orxANIM(STRUCTURE) orxSTRUCTURE_GET_POINTER(STRUCTURE, ANIM) |
| #define | orxANIMPOINTER(STRUCTURE) orxSTRUCTURE_GET_POINTER(STRUCTURE, ANIMPOINTER) |
| #define | orxANIMSET(STRUCTURE) orxSTRUCTURE_GET_POINTER(STRUCTURE, ANIMSET) |
| #define | orxBODY(STRUCTURE) orxSTRUCTURE_GET_POINTER(STRUCTURE, BODY) |
| #define | orxCAMERA(STRUCTURE) orxSTRUCTURE_GET_POINTER(STRUCTURE, CAMERA) |
| #define | orxCLOCK(STRUCTURE) orxSTRUCTURE_GET_POINTER(STRUCTURE, CLOCK) |
| #define | orxFONT(STRUCTURE) orxSTRUCTURE_GET_POINTER(STRUCTURE, FONT) |
| #define | orxFRAME(STRUCTURE) orxSTRUCTURE_GET_POINTER(STRUCTURE, FRAME) |
| #define | orxFX(STRUCTURE) orxSTRUCTURE_GET_POINTER(STRUCTURE, FX) |
| #define | orxFXPOINTER(STRUCTURE) orxSTRUCTURE_GET_POINTER(STRUCTURE, FXPOINTER) |
| #define | orxGRAPHIC(STRUCTURE) orxSTRUCTURE_GET_POINTER(STRUCTURE, GRAPHIC) |
| #define | orxOBJECT(STRUCTURE) orxSTRUCTURE_GET_POINTER(STRUCTURE, OBJECT) |
| #define | orxSHADER(STRUCTURE) orxSTRUCTURE_GET_POINTER(STRUCTURE, SHADER) |
| #define | orxSHADERPOINTER(STRUCTURE) orxSTRUCTURE_GET_POINTER(STRUCTURE, SHADERPOINTER) |
| #define | orxSOUND(STRUCTURE) orxSTRUCTURE_GET_POINTER(STRUCTURE, SOUND) |
| #define | orxSOUNDPOINTER(STRUCTURE) orxSTRUCTURE_GET_POINTER(STRUCTURE, SOUNDPOINTER) |
| #define | orxSPAWNER(STRUCTURE) orxSTRUCTURE_GET_POINTER(STRUCTURE, SPAWNER) |
| #define | orxSTRUCTURE(STRUCTURE) (((STRUCTURE != orxNULL) && ((((orxSTRUCTURE *)STRUCTURE)->eID ^ orxSTRUCTURE_MAGIC_TAG_ACTIVE) < orxSTRUCTURE_ID_NUMBER)) ? (orxSTRUCTURE *)STRUCTURE : (orxSTRUCTURE *)orxNULL) |
| #define | orxSTRUCTURE_ASSERT(STRUCTURE) |
| #define | orxSTRUCTURE_GET_POINTER(STRUCTURE, TYPE) ((orx##TYPE *)_orxStructure_GetPointer(STRUCTURE, orxSTRUCTURE_ID_##TYPE)) |
| #define | orxSTRUCTURE_MAGIC_TAG_ACTIVE 0x00000000 |
| #define | orxSTRUCTURE_MAGIC_TAG_DELETED 0xDEADC0DE |
| #define | orxSTRUCTURE_REGISTER(TYPE, STORAGE_TYPE, MEMORY_TYPE, UPDATE_FUNCTION) orxStructure_Register(orxSTRUCTURE_ID_##TYPE, STORAGE_TYPE, MEMORY_TYPE, sizeof(orx##TYPE), UPDATE_FUNCTION) |
| #define | orxTEXT(STRUCTURE) orxSTRUCTURE_GET_POINTER(STRUCTURE, TEXT) |
| #define | orxTEXTURE(STRUCTURE) orxSTRUCTURE_GET_POINTER(STRUCTURE, TEXTURE) |
| #define | orxVIEWPORT(STRUCTURE) orxSTRUCTURE_GET_POINTER(STRUCTURE, VIEWPORT) |
Typedefs | |
| typedef orxSTATUS(orxFASTCALL * | orxSTRUCTURE_UPDATE_FUNCTION )(orxSTRUCTURE *_pstStructure, const orxSTRUCTURE *_pstCaller, const orxCLOCK_INFO *_pstClockInfo) |
Enumerations | |
| enum | orxSTRUCTURE_ID { orxSTRUCTURE_ID_ANIMPOINTER = 0, orxSTRUCTURE_ID_BODY, orxSTRUCTURE_ID_CLOCK, orxSTRUCTURE_ID_FRAME, orxSTRUCTURE_ID_FXPOINTER, orxSTRUCTURE_ID_GRAPHIC, orxSTRUCTURE_ID_SHADERPOINTER, orxSTRUCTURE_ID_SOUNDPOINTER, orxSTRUCTURE_ID_SPAWNER, orxSTRUCTURE_ID_LINKABLE_NUMBER, orxSTRUCTURE_ID_ANIM = orxSTRUCTURE_ID_LINKABLE_NUMBER, orxSTRUCTURE_ID_ANIMSET, orxSTRUCTURE_ID_CAMERA, orxSTRUCTURE_ID_FONT, orxSTRUCTURE_ID_FX, orxSTRUCTURE_ID_OBJECT, orxSTRUCTURE_ID_SHADER, orxSTRUCTURE_ID_SOUND, orxSTRUCTURE_ID_TEXT, orxSTRUCTURE_ID_TEXTURE, orxSTRUCTURE_ID_VIEWPORT, orxSTRUCTURE_ID_NUMBER, orxSTRUCTURE_ID_NONE = orxENUM_NONE } |
| enum | orxSTRUCTURE_STORAGE_TYPE { orxSTRUCTURE_STORAGE_TYPE_LINKLIST = 0, orxSTRUCTURE_STORAGE_TYPE_TREE, orxSTRUCTURE_STORAGE_TYPE_NUMBER, orxSTRUCTURE_STORAGE_TYPE_NONE = orxENUM_NONE } |
Functions | |
| static orxINLINE orxSTRUCTURE * | _orxStructure_GetPointer (const void *_pStructure, orxSTRUCTURE_ID _eStructureID) |
| orxDLLAPI orxSTRUCTURE *orxFASTCALL | orxStructure_Create (orxSTRUCTURE_ID _eStructureID) |
| static orxINLINE void | orxStructure_DecreaseCounter (void *_pStructure) |
| orxDLLAPI orxSTATUS orxFASTCALL | orxStructure_Delete (void *_pStructure) |
| orxDLLAPI void orxFASTCALL | orxStructure_Exit () |
| orxDLLAPI orxSTRUCTURE *orxFASTCALL | orxStructure_GetChild (const void *_pStructure) |
| orxDLLAPI orxU32 orxFASTCALL | orxStructure_GetCounter (orxSTRUCTURE_ID _eStructureID) |
| orxDLLAPI orxSTRUCTURE *orxFASTCALL | orxStructure_GetFirst (orxSTRUCTURE_ID _eStructureID) |
| static orxINLINE orxU32 | orxStructure_GetFlags (const void *_pStructure, orxU32 _u32Mask) |
| static orxINLINE orxSTRUCTURE_ID | orxStructure_GetID (const void *_pStructure) |
| orxDLLAPI orxSTRUCTURE *orxFASTCALL | orxStructure_GetLast (orxSTRUCTURE_ID _eStructureID) |
| orxDLLAPI orxSTRUCTURE *orxFASTCALL | orxStructure_GetNext (const void *_pStructure) |
| orxDLLAPI orxSTRUCTURE *orxFASTCALL | orxStructure_GetParent (const void *_pStructure) |
| orxDLLAPI orxSTRUCTURE *orxFASTCALL | orxStructure_GetPrevious (const void *_pStructure) |
| static orxINLINE orxS32 | orxStructure_GetRefCounter (const void *_pStructure) |
| orxDLLAPI orxSTRUCTURE *orxFASTCALL | orxStructure_GetSibling (const void *_pStructure) |
| orxDLLAPI orxSTRUCTURE_STORAGE_TYPE orxFASTCALL | orxStructure_GetStorageType (orxSTRUCTURE_ID _eStructureID) |
| static orxINLINE void | orxStructure_IncreaseCounter (void *_pStructure) |
| orxDLLAPI orxSTATUS orxFASTCALL | orxStructure_Init () |
| orxDLLAPI orxSTATUS orxFASTCALL | orxStructure_Register (orxSTRUCTURE_ID _eStructureID, orxSTRUCTURE_STORAGE_TYPE _eStorageType, orxMEMORY_TYPE _eMemoryType, orxU32 _u32Size, const orxSTRUCTURE_UPDATE_FUNCTION _pfnUpdate) |
| static orxINLINE void | orxStructure_SetFlags (void *_pStructure, orxU32 _u32AddFlags, orxU32 _u32RemoveFlags) |
| orxDLLAPI orxSTATUS orxFASTCALL | orxStructure_SetParent (void *_pStructure, void *_phParent) |
| orxDLLAPI void orxFASTCALL | orxStructure_Setup () |
| static orxINLINE orxBOOL | orxStructure_TestAllFlags (const void *_pStructure, orxU32 _u32Flags) |
| static orxINLINE orxBOOL | orxStructure_TestFlags (const void *_pStructure, orxU32 _u32Flags) |
| orxDLLAPI orxSTATUS orxFASTCALL | orxStructure_Unregister (orxSTRUCTURE_ID _eStructureID) |
| orxDLLAPI orxSTATUS orxFASTCALL | orxStructure_Update (void *_pStructure, const void *_phCaller, const orxCLOCK_INFO *_pstClockInfo) |
Structure module Allows to creates and handle structures. Structures can be referenced by other structures (or objects).
| #define orxANIM | ( | STRUCTURE ) | orxSTRUCTURE_GET_POINTER(STRUCTURE, ANIM) |
Definition at line 60 of file orxStructure.h.
| #define orxANIMPOINTER | ( | STRUCTURE ) | orxSTRUCTURE_GET_POINTER(STRUCTURE, ANIMPOINTER) |
Definition at line 61 of file orxStructure.h.
| #define orxANIMSET | ( | STRUCTURE ) | orxSTRUCTURE_GET_POINTER(STRUCTURE, ANIMSET) |
Definition at line 62 of file orxStructure.h.
| #define orxBODY | ( | STRUCTURE ) | orxSTRUCTURE_GET_POINTER(STRUCTURE, BODY) |
Definition at line 63 of file orxStructure.h.
| #define orxCAMERA | ( | STRUCTURE ) | orxSTRUCTURE_GET_POINTER(STRUCTURE, CAMERA) |
Definition at line 64 of file orxStructure.h.
| #define orxCLOCK | ( | STRUCTURE ) | orxSTRUCTURE_GET_POINTER(STRUCTURE, CLOCK) |
Definition at line 65 of file orxStructure.h.
| #define orxFONT | ( | STRUCTURE ) | orxSTRUCTURE_GET_POINTER(STRUCTURE, FONT) |
Definition at line 66 of file orxStructure.h.
| #define orxFRAME | ( | STRUCTURE ) | orxSTRUCTURE_GET_POINTER(STRUCTURE, FRAME) |
Definition at line 67 of file orxStructure.h.
| #define orxFX | ( | STRUCTURE ) | orxSTRUCTURE_GET_POINTER(STRUCTURE, FX) |
Definition at line 68 of file orxStructure.h.
| #define orxFXPOINTER | ( | STRUCTURE ) | orxSTRUCTURE_GET_POINTER(STRUCTURE, FXPOINTER) |
Definition at line 69 of file orxStructure.h.
| #define orxGRAPHIC | ( | STRUCTURE ) | orxSTRUCTURE_GET_POINTER(STRUCTURE, GRAPHIC) |
Definition at line 70 of file orxStructure.h.
| #define orxOBJECT | ( | STRUCTURE ) | orxSTRUCTURE_GET_POINTER(STRUCTURE, OBJECT) |
Definition at line 71 of file orxStructure.h.
| #define orxSHADER | ( | STRUCTURE ) | orxSTRUCTURE_GET_POINTER(STRUCTURE, SHADER) |
Definition at line 74 of file orxStructure.h.
| #define orxSHADERPOINTER | ( | STRUCTURE ) | orxSTRUCTURE_GET_POINTER(STRUCTURE, SHADERPOINTER) |
Definition at line 75 of file orxStructure.h.
| #define orxSOUND | ( | STRUCTURE ) | orxSTRUCTURE_GET_POINTER(STRUCTURE, SOUND) |
Definition at line 72 of file orxStructure.h.
| #define orxSOUNDPOINTER | ( | STRUCTURE ) | orxSTRUCTURE_GET_POINTER(STRUCTURE, SOUNDPOINTER) |
Definition at line 73 of file orxStructure.h.
| #define orxSPAWNER | ( | STRUCTURE ) | orxSTRUCTURE_GET_POINTER(STRUCTURE, SPAWNER) |
Definition at line 76 of file orxStructure.h.
| #define orxSTRUCTURE | ( | STRUCTURE ) | (((STRUCTURE != orxNULL) && ((((orxSTRUCTURE *)STRUCTURE)->eID ^ orxSTRUCTURE_MAGIC_TAG_ACTIVE) < orxSTRUCTURE_ID_NUMBER)) ? (orxSTRUCTURE *)STRUCTURE : (orxSTRUCTURE *)orxNULL) |
Definition at line 58 of file orxStructure.h.
| #define orxSTRUCTURE_ASSERT | ( | STRUCTURE ) |
orxASSERT((STRUCTURE) != orxNULL); \ orxASSERT((((orxSTRUCTURE *)(STRUCTURE))->eID ^ orxSTRUCTURE_MAGIC_TAG_ACTIVE) < orxSTRUCTURE_ID_NUMBER);
Structure assert
Definition at line 88 of file orxStructure.h.
| #define orxSTRUCTURE_GET_POINTER | ( | STRUCTURE, | |
| TYPE | |||
| ) | ((orx##TYPE *)_orxStructure_GetPointer(STRUCTURE, orxSTRUCTURE_ID_##TYPE)) |
Structure pointer get helpers
Definition at line 56 of file orxStructure.h.
| #define orxSTRUCTURE_MAGIC_TAG_ACTIVE 0x00000000 |
Structure magic number
Definition at line 97 of file orxStructure.h.
| #define orxSTRUCTURE_MAGIC_TAG_DELETED 0xDEADC0DE |
Definition at line 100 of file orxStructure.h.
| #define orxSTRUCTURE_REGISTER | ( | TYPE, | |
| STORAGE_TYPE, | |||
| MEMORY_TYPE, | |||
| UPDATE_FUNCTION | |||
| ) | orxStructure_Register(orxSTRUCTURE_ID_##TYPE, STORAGE_TYPE, MEMORY_TYPE, sizeof(orx##TYPE), UPDATE_FUNCTION) |
Structure register macro
Definition at line 83 of file orxStructure.h.
| #define orxTEXT | ( | STRUCTURE ) | orxSTRUCTURE_GET_POINTER(STRUCTURE, TEXT) |
Definition at line 77 of file orxStructure.h.
| #define orxTEXTURE | ( | STRUCTURE ) | orxSTRUCTURE_GET_POINTER(STRUCTURE, TEXTURE) |
Definition at line 78 of file orxStructure.h.
| #define orxVIEWPORT | ( | STRUCTURE ) | orxSTRUCTURE_GET_POINTER(STRUCTURE, VIEWPORT) |
Definition at line 79 of file orxStructure.h.
| typedef orxSTATUS(orxFASTCALL * orxSTRUCTURE_UPDATE_FUNCTION)(orxSTRUCTURE *_pstStructure, const orxSTRUCTURE *_pstCaller, const orxCLOCK_INFO *_pstClockInfo) |
Structure update callback function type
Definition at line 168 of file orxStructure.h.
| enum orxSTRUCTURE_ID |
Structure IDs
Definition at line 105 of file orxStructure.h.
Structure storage types
| orxSTRUCTURE_STORAGE_TYPE_LINKLIST | |
| orxSTRUCTURE_STORAGE_TYPE_TREE | |
| orxSTRUCTURE_STORAGE_TYPE_NUMBER | |
| orxSTRUCTURE_STORAGE_TYPE_NONE |
Definition at line 143 of file orxStructure.h.
| static orxINLINE orxSTRUCTURE* _orxStructure_GetPointer | ( | const void * | _pStructure, |
| orxSTRUCTURE_ID | _eStructureID | ||
| ) | [static] |
Gets structure pointer / debug mode
| [in] | _pStructure | Concerned structure |
| [in] | _eStructureID | ID to test the structure against |
Definition at line 176 of file orxStructure.h.
| orxDLLAPI orxSTRUCTURE* orxFASTCALL orxStructure_Create | ( | orxSTRUCTURE_ID | _eStructureID ) |
Creates a clean structure for given type
| [in] | _eStructureID | Concerned structure ID |
| static orxINLINE void orxStructure_DecreaseCounter | ( | void * | _pStructure ) | [static] |
Decreases structure reference counter
| [in] | _pStructure | Concerned structure |
Definition at line 326 of file orxStructure.h.
| orxDLLAPI orxSTATUS orxFASTCALL orxStructure_Delete | ( | void * | _pStructure ) |
Deletes a structure (needs to be cleaned beforehand)
| [in] | _pStructure | Concerned structure |
| orxDLLAPI void orxFASTCALL orxStructure_Exit | ( | ) |
Exits from the structure module
| orxDLLAPI orxSTRUCTURE* orxFASTCALL orxStructure_GetChild | ( | const void * | _pStructure ) |
| orxDLLAPI orxU32 orxFASTCALL orxStructure_GetCounter | ( | orxSTRUCTURE_ID | _eStructureID ) |
Gets given type structure counter
| [in] | _eStructureID | Concerned structure ID |
| orxDLLAPI orxSTRUCTURE* orxFASTCALL orxStructure_GetFirst | ( | orxSTRUCTURE_ID | _eStructureID ) |
*** Structure storage accessors *** Gets first stored structure (first list cell or tree root depending on storage type)
| [in] | _eStructureID | Concerned structure ID |
| static orxINLINE orxU32 orxStructure_GetFlags | ( | const void * | _pStructure, |
| orxU32 | _u32Mask | ||
| ) | [static] |
Gets structure flags
| [in] | _pStructure | Concerned structure |
| [in] | _u32Mask | Mask to use for getting flags |
Definition at line 397 of file orxStructure.h.
| static orxINLINE orxSTRUCTURE_ID orxStructure_GetID | ( | const void * | _pStructure ) | [static] |
Gets structure ID
| [in] | _pStructure | Concerned structure |
Definition at line 355 of file orxStructure.h.
| orxDLLAPI orxSTRUCTURE* orxFASTCALL orxStructure_GetLast | ( | orxSTRUCTURE_ID | _eStructureID ) |
Gets last stored structure (last list cell or tree root depending on storage type)
| [in] | _eStructureID | Concerned structure ID |
| orxDLLAPI orxSTRUCTURE* orxFASTCALL orxStructure_GetNext | ( | const void * | _pStructure ) |
| orxDLLAPI orxSTRUCTURE* orxFASTCALL orxStructure_GetParent | ( | const void * | _pStructure ) |
| orxDLLAPI orxSTRUCTURE* orxFASTCALL orxStructure_GetPrevious | ( | const void * | _pStructure ) |
| static orxINLINE orxS32 orxStructure_GetRefCounter | ( | const void * | _pStructure ) | [static] |
Gets structure reference counter
| [in] | _pStructure | Concerned structure |
Definition at line 342 of file orxStructure.h.
| orxDLLAPI orxSTRUCTURE* orxFASTCALL orxStructure_GetSibling | ( | const void * | _pStructure ) |
| orxDLLAPI orxSTRUCTURE_STORAGE_TYPE orxFASTCALL orxStructure_GetStorageType | ( | orxSTRUCTURE_ID | _eStructureID ) |
Gets structure storage type
| [in] | _eStructureID | Concerned structure ID |
| static orxINLINE void orxStructure_IncreaseCounter | ( | void * | _pStructure ) | [static] |
*** Inlined structure accessors *** Increases structure reference counter
| [in] | _pStructure | Concerned structure |
Definition at line 312 of file orxStructure.h.
| orxDLLAPI orxSTATUS orxFASTCALL orxStructure_Init | ( | ) |
Initializess the structure module
| orxDLLAPI orxSTATUS orxFASTCALL orxStructure_Register | ( | orxSTRUCTURE_ID | _eStructureID, |
| orxSTRUCTURE_STORAGE_TYPE | _eStorageType, | ||
| orxMEMORY_TYPE | _eMemoryType, | ||
| orxU32 | _u32Size, | ||
| const orxSTRUCTURE_UPDATE_FUNCTION | _pfnUpdate | ||
| ) |
Registers a given ID
| [in] | _eStructureID | Concerned structure ID |
| [in] | _eStorageType | Storage type to use for this structure type |
| [in] | _eMemoryType | Memory type to store this structure type |
| [in] | _u32Size | Structure size |
| [in] | _pfnUpdate | Structure update function |
| static orxINLINE void orxStructure_SetFlags | ( | void * | _pStructure, |
| orxU32 | _u32AddFlags, | ||
| orxU32 | _u32RemoveFlags | ||
| ) | [static] |
Sets structure flags
| [in] | _pStructure | Concerned structure |
| [in] | _u32AddFlags | Flags to add |
| [in] | _u32RemoveFlags | Flags to remove |
Definition at line 411 of file orxStructure.h.
| orxDLLAPI orxSTATUS orxFASTCALL orxStructure_SetParent | ( | void * | _pStructure, |
| void * | _phParent | ||
| ) |
Sets structure tree parent
| [in] | _pStructure | Concerned structure |
| [in] | _phParent | Structure to set as parent |
| orxDLLAPI void orxFASTCALL orxStructure_Setup | ( | ) |
Structure module setup
| static orxINLINE orxBOOL orxStructure_TestAllFlags | ( | const void * | _pStructure, |
| orxU32 | _u32Flags | ||
| ) | [static] |
Tests all flags against structure ones
| [in] | _pStructure | Concerned structure |
| [in] | _u32Flags | Flags to test |
Definition at line 383 of file orxStructure.h.
| static orxINLINE orxBOOL orxStructure_TestFlags | ( | const void * | _pStructure, |
| orxU32 | _u32Flags | ||
| ) | [static] |
Tests flags against structure ones
| [in] | _pStructure | Concerned structure |
| [in] | _u32Flags | Flags to test |
Definition at line 369 of file orxStructure.h.
| orxDLLAPI orxSTATUS orxFASTCALL orxStructure_Unregister | ( | orxSTRUCTURE_ID | _eStructureID ) |
Unregisters a given ID
| [in] | _eStructureID | Concerned structure ID |
| orxDLLAPI orxSTATUS orxFASTCALL orxStructure_Update | ( | void * | _pStructure, |
| const void * | _phCaller, | ||
| const orxCLOCK_INFO * | _pstClockInfo | ||
| ) |
Updates structure if update function was registered for the structure type
| [in] | _pStructure | Concerned structure |
| [in] | _phCaller | Caller structure |
| [in] | _pstClockInfo | Update associated clock info |
1.5.6