orx  1.11
Portable Game Engine
orxBank.h
Go to the documentation of this file.
1 /* Orx - Portable Game Engine
2  *
3  * Copyright (c) 2008-2020 Orx-Project
4  *
5  * This software is provided 'as-is', without any express or implied
6  * warranty. In no event will the authors be held liable for any damages
7  * arising from the use of this software.
8  *
9  * Permission is granted to anyone to use this software for any purpose,
10  * including commercial applications, and to alter it and redistribute it
11  * freely, subject to the following restrictions:
12  *
13  * 1. The origin of this software must not be misrepresented; you must not
14  * claim that you wrote the original software. If you use this software
15  * in a product, an acknowledgment in the product documentation would be
16  * appreciated but is not required.
17  *
18  * 2. Altered source versions must be plainly marked as such, and must not be
19  * misrepresented as being the original software.
20  *
21  * 3. This notice may not be removed or altered from any source
22  * distribution.
23  */
24 
47 #ifndef _orxBANK_H_
48 #define _orxBANK_H_
49 
50 
51 #include "orxInclude.h"
52 #include "memory/orxMemory.h"
53 
54 
55 /* Internal Bank structure */
56 typedef struct __orxBANK_t orxBANK;
57 
58 /* Define flags */
59 #define orxBANK_KU32_FLAG_NONE 0x00000000
60 #define orxBANK_KU32_FLAG_NOT_EXPANDABLE 0x00000001
64 extern orxDLLAPI void orxFASTCALL orxBank_Setup();
65 
69 extern orxDLLAPI orxSTATUS orxFASTCALL orxBank_Init();
70 
73 extern orxDLLAPI void orxFASTCALL orxBank_Exit();
74 
82 extern orxDLLAPI orxBANK *orxFASTCALL orxBank_Create(orxU16 _u16NbElem, orxU32 _u32Size, orxU32 _u32Flags, orxMEMORY_TYPE _eMemType);
83 
87 extern orxDLLAPI void orxFASTCALL orxBank_Delete(orxBANK *_pstBank);
88 
93 extern orxDLLAPI void *orxFASTCALL orxBank_Allocate(orxBANK *_pstBank);
94 
101 extern orxDLLAPI void *orxFASTCALL orxBank_AllocateIndexed(orxBANK *_pstBank, orxU32 *_pu32ItemIndex, void **_ppPrevious);
102 
107 extern orxDLLAPI void orxFASTCALL orxBank_Free(orxBANK *_pstBank, void *_pCell);
108 
112 extern orxDLLAPI void orxFASTCALL orxBank_Clear(orxBANK *_pstBank);
113 
117 extern orxDLLAPI void orxFASTCALL orxBank_Compact(orxBANK *_pstBank);
118 
121 extern orxDLLAPI void orxFASTCALL orxBank_CompactAll();
122 
128 extern orxDLLAPI void *orxFASTCALL orxBank_GetNext(const orxBANK *_pstBank, const void *_pCell);
129 
135 extern orxDLLAPI orxU32 orxFASTCALL orxBank_GetIndex(const orxBANK *_pstBank, const void *_pCell);
136 
142 extern orxDLLAPI void *orxFASTCALL orxBank_GetAtIndex(const orxBANK *_pstBank, orxU32 _u32Index);
143 
148 extern orxDLLAPI orxU32 orxFASTCALL orxBank_GetCount(const orxBANK *_pstBank);
149 
150 
151 /*******************************************************************************
152  * DEBUG FUNCTION
153  ******************************************************************************/
154 
155 #ifdef __orxDEBUG__
156 
160 extern orxDLLAPI void orxFASTCALL orxBank_DebugPrint(const orxBANK *_pstBank);
161 
162 #endif /* __orxDEBUG__ */
163 
164 #endif /* _orxBANK_H_ */
165 
orxDLLAPI void orxFASTCALL orxBank_Clear(orxBANK *_pstBank)
orxDLLAPI void orxFASTCALL orxBank_Delete(orxBANK *_pstBank)
orxDLLAPI orxU32 orxFASTCALL orxBank_GetCount(const orxBANK *_pstBank)
orxDLLAPI orxU32 orxFASTCALL orxBank_GetIndex(const orxBANK *_pstBank, const void *_pCell)
orxDLLAPI void *orxFASTCALL orxBank_GetAtIndex(const orxBANK *_pstBank, orxU32 _u32Index)
orxDLLAPI void *orxFASTCALL orxBank_AllocateIndexed(orxBANK *_pstBank, orxU32 *_pu32ItemIndex, void **_ppPrevious)
orxDLLAPI void orxFASTCALL orxBank_CompactAll()
orxMEMORY_TYPE
Definition: orxMemory.h:87
orxDLLAPI void orxFASTCALL orxBank_Compact(orxBANK *_pstBank)
orxSTATUS
Definition: orxType.h:246
orxDLLAPI orxBANK *orxFASTCALL orxBank_Create(orxU16 _u16NbElem, orxU32 _u32Size, orxU32 _u32Flags, orxMEMORY_TYPE _eMemType)
#define orxDLLAPI
Definition: orxDecl.h:381
orxDLLAPI void orxFASTCALL orxBank_Free(orxBANK *_pstBank, void *_pCell)
orxDLLAPI void *orxFASTCALL orxBank_Allocate(orxBANK *_pstBank)
orxDLLAPI void *orxFASTCALL orxBank_GetNext(const orxBANK *_pstBank, const void *_pCell)
struct __orxBANK_t orxBANK
Definition: orxBank.h:56
orxDLLAPI orxSTATUS orxFASTCALL orxBank_Init()
orxDLLAPI void orxFASTCALL orxBank_Exit()

Generated for orx by doxygen 1.8.11