orx  stable
Portable Game Engine
orxStructure.h File Reference
#include "orxInclude.h"
#include "core/orxClock.h"
#include "memory/orxMemory.h"
#include "utils/orxLinkList.h"
#include "utils/orxTree.h"

Go to the source code of this file.

Data Structures

struct  orxSTRUCTURE
 

Macros

#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)->u64GUID & orxSTRUCTURE_GUID_MASK_STRUCTURE_ID) >> orxSTRUCTURE_GUID_SHIFT_STRUCTURE_ID) < orxSTRUCTURE_ID_NUMBER)) ? (orxSTRUCTURE *)STRUCTURE : (orxSTRUCTURE *)orxNULL)
 
#define orxSTRUCTURE_ASSERT(STRUCTURE)    orxASSERT((STRUCTURE != orxNULL) && (((((orxSTRUCTURE *)(STRUCTURE))->u64GUID & orxSTRUCTURE_GUID_MASK_STRUCTURE_ID) >> orxSTRUCTURE_GUID_SHIFT_STRUCTURE_ID) < orxSTRUCTURE_ID_NUMBER));
 
#define orxSTRUCTURE_DECLARE_ID_ENTRY(ID)    case orxSTRUCTURE_ID_##ID: zResult = #ID; break
 
#define orxSTRUCTURE_GET_POINTER(STRUCTURE, TYPE)   ((orx##TYPE *)_orxStructure_GetPointer(STRUCTURE, orxSTRUCTURE_ID_##TYPE))
 
#define orxSTRUCTURE_GUID_MAGIC_TAG_DELETED   0xDEFACED0DEADC0DEULL
 
#define orxSTRUCTURE_GUID_MASK_INSTANCE_ID   0x00000000FFFFFFE0ULL
 
#define orxSTRUCTURE_GUID_MASK_ITEM_ID   0x0000FFFF00000000ULL
 
#define orxSTRUCTURE_GUID_MASK_REF_COUNTER   0xFFFF000000000000ULL
 
#define orxSTRUCTURE_GUID_MASK_STRUCTURE_ID   0x000000000000001FULL
 
#define orxSTRUCTURE_GUID_SHIFT_INSTANCE_ID   5
 
#define orxSTRUCTURE_GUID_SHIFT_ITEM_ID   32
 
#define orxSTRUCTURE_GUID_SHIFT_REF_COUNTER   48
 
#define orxSTRUCTURE_GUID_SHIFT_STRUCTURE_ID   0
 
#define orxSTRUCTURE_REGISTER(TYPE, STORAGE_TYPE, MEMORY_TYPE, BANK_SIZE, UPDATE_FUNCTION)   orxStructure_Register(orxSTRUCTURE_ID_##TYPE, STORAGE_TYPE, MEMORY_TYPE, sizeof(orx##TYPE), BANK_SIZE, UPDATE_FUNCTION)
 
#define orxTEXT(STRUCTURE)    orxSTRUCTURE_GET_POINTER(STRUCTURE, TEXT)
 
#define orxTEXTURE(STRUCTURE)    orxSTRUCTURE_GET_POINTER(STRUCTURE, TEXTURE)
 
#define orxTIMELINE(STRUCTURE)    orxSTRUCTURE_GET_POINTER(STRUCTURE, TIMELINE)
 
#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_TIMELINE, 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_Get (orxU64 _u64GUID)
 
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 orxU64 orxStructure_GetGUID (const void *_pStructure)
 
static orxINLINE orxSTRUCTURE_ID orxStructure_GetID (const void *_pStructure)
 
static orxINLINE const orxSTRING orxStructure_GetIDString (orxSTRUCTURE_ID _eID)
 
orxDLLAPI orxSTRUCTURE *orxFASTCALL orxStructure_GetLast (orxSTRUCTURE_ID _eStructureID)
 
orxDLLAPI orxSTRUCTURE *orxFASTCALL orxStructure_GetNext (const void *_pStructure)
 
orxDLLAPI orxSTRUCTURE *orxFASTCALL orxStructure_GetOwner (const void *_pStructure)
 
orxDLLAPI orxSTRUCTURE *orxFASTCALL orxStructure_GetParent (const void *_pStructure)
 
orxDLLAPI orxSTRUCTURE *orxFASTCALL orxStructure_GetPrevious (const void *_pStructure)
 
static orxINLINE orxU32 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, orxU32 _u32BankSize, const orxSTRUCTURE_UPDATE_FUNCTION _pfnUpdate)
 
static orxINLINE void orxStructure_SetFlags (void *_pStructure, orxU32 _u32AddFlags, orxU32 _u32RemoveFlags)
 
orxDLLAPI orxSTATUS orxFASTCALL orxStructure_SetOwner (void *_pStructure, void *_pOwner)
 
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)
 

Detailed Description

Macro Definition Documentation

#define orxSTRUCTURE_DECLARE_ID_ENTRY (   ID)    case orxSTRUCTURE_ID_##ID: zResult = #ID; break

Generated for orx by doxygen 1.5.6