orx  stable
Portable Game Engine
orxBank.h
Go to the documentation of this file.
1 /* Orx - Portable Game Engine
2  *
3  * Copyright (c) 2008-2017 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 
108 extern orxDLLAPI void orxFASTCALL orxBank_Free(orxBANK *_pstBank, void *_pCell);
109 
113 extern orxDLLAPI void orxFASTCALL orxBank_Clear(orxBANK *_pstBank);
114 
118 extern orxDLLAPI void orxFASTCALL orxBank_Compact(orxBANK *_pstBank);
119 
122 extern orxDLLAPI void orxFASTCALL orxBank_CompactAll();
123 
129 extern orxDLLAPI void *orxFASTCALL orxBank_GetNext(const orxBANK *_pstBank, const void *_pCell);
130 
136 extern orxDLLAPI orxU32 orxFASTCALL orxBank_GetIndex(const orxBANK *_pstBank, const void *_pCell);
137 
143 extern orxDLLAPI void *orxFASTCALL orxBank_GetAtIndex(const orxBANK *_pstBank, orxU32 _u32Index);
144 
149 extern orxDLLAPI orxU32 orxFASTCALL orxBank_GetCounter(const orxBANK *_pstBank);
150 
151 
152 /*******************************************************************************
153  * DEBUG FUNCTION
154  ******************************************************************************/
155 
156 #ifdef __orxDEBUG__
157 
161 extern orxDLLAPI void orxFASTCALL orxBank_DebugPrint(const orxBANK *_pstBank);
162 
163 #endif /* __orxDEBUG__ */
164 
165 #endif /* _orxBANK_H_ */
166 
orxDLLAPI void orxFASTCALL orxBank_Clear(orxBANK *_pstBank)
orxDLLAPI void orxFASTCALL orxBank_Delete(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()
orxDLLAPI orxU32 orxFASTCALL orxBank_GetCounter(const orxBANK *_pstBank)
orxMEMORY_TYPE
Definition: orxMemory.h:98
orxDLLAPI void orxFASTCALL orxBank_Compact(orxBANK *_pstBank)
orxSTATUS
Definition: orxType.h:243
orxDLLAPI orxBANK *orxFASTCALL orxBank_Create(orxU16 _u16NbElem, orxU32 _u32Size, orxU32 _u32Flags, orxMEMORY_TYPE _eMemType)
#define orxDLLAPI
Definition: orxDecl.h:387
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.5.6