#include <ArrayPtrs.h>
Public Types | |
typedef const void *typedef T * | TPtr |
Pointer to array type. | |
Public Member Functions | |
typedef | int (__cdecl *cmp_fce)(const void * |
Sorting function sort two items func(a,b): Be carefull - items must be pointers to pointers!!! | |
TArrayPtrs (void) | |
Constructor. | |
~TArrayPtrs (void) | |
Destructor. | |
TArrayPtrs (const TArrayPtrs< T, size, step > &orig) | |
fake copy constructor | |
void | operator= (const TArrayPtrs< T, size, step > &orig) |
fake assignment operator | |
DWORD | GetItemSize (void) const |
Return size of one item in this array. | |
void | Clear (void) |
Releases this list. | |
void | ClearDeallocOff (void) |
Releases this list. | |
void | ClearWithoutDelete (void) |
Releases this list without calling DELETE on items. | |
void | ReserveSize (const DWORD &newSize) |
Resize array. | |
DWORD | GetSize (void) const |
Returns number of items in list. | |
DWORD | Size (void) const |
Returns number of items in list. | |
DWORD | Count (void) const |
Returns number of items in list. | |
DWORD | GetAllocatedSpace (void) const |
Returns number of allocated items. | |
void | AddItem (T *item) |
Add item at end of list. | |
void | RemoveItem (const DWORD &index) |
Remove item with given index from array. | |
void | RemoveItem (const TPtr item) |
Remove specified item from array. | |
TPtr | RemoveItemWithoutDelete (const TPtr item) |
Remove specified item from array without calling operator delete on it. | |
void | RemoveItemFast (const DWORD &index) |
Remove item with given index from array. | |
void | RemoveItemFast (const TPtr item) |
Remove specified item from array. | |
TPtr | RemoveItemFastWithoutDelete (const TPtr item) |
Remove specified item from array without calling operator delete on it. | |
void | RemoveLastItem (void) |
Remove last item in array. | |
T * | GetItem (const DWORD &index) const |
Gets item on desired index. | |
T *& | GetItemRef (const DWORD &index) |
Gets reference to item on desired index. | |
const T * | GetItemRef (const DWORD &index) const |
Gets reference to item on desired index. | |
T *& | operator[] (const DWORD &index) |
Gets reference to item on desired index. | |
const T * | operator[] (const DWORD &index) const |
Gets reference to item on desired index. | |
T ** | GetArray (void) |
Return pointer to array of items stored in this list!!! | |
const T ** | GetArray (void) const |
Return pointer to array of items stored in this list!!! | |
BOOL | IsItemInside (const TPtr item) const |
Determine whether specified item is inside array. | |
void | Sort (cmp_fce func) |
Sort this list by given sorting function. | |
void | Reverse (void) |
Reverse order of items in array. |
This template must be used ONLY for POINTER types. Destructor automatically calls operator DELETE to any pointers.
If you want not to call DELETE operator please set given item to NULL.
Pointers inside are stored in array which is allocated to sizeof(int).
Definition at line 31 of file ArrayPtrs.h.
|
Pointer to array type.
Definition at line 45 of file ArrayPtrs.h. |
|
Constructor.
Definition at line 118 of file ArrayPtrs.h. References TMemManager::new_align(). Here is the call graph for this function: ![]() |
|
Destructor. Release list. Automatically call DELETE operator on items. Definition at line 135 of file ArrayPtrs.h. References TMemManager::free_align(). Here is the call graph for this function: ![]() |
|
fake copy constructor
|
|
Add item at end of list. New item is created via operator=.
Definition at line 265 of file ArrayPtrs.h. References TArrayPtrs< T, size, step >::ReserveSize(). Referenced by NSConfigFile::TConfigFileSection::Add(), TGraphicTexture::Create(), NSShaders::TPixelShaderManager::DestroyUnreferencedShaders(), NSShaders::TVertexShaderManager::DestroyUnreferencedShaders(), NSMeshes::TDeclarationManager::Initialize(), NSFileSystem::TFSFileSystem::RegisterCabinet(), NSFileSystem::TFSFileSystem::RegisterPath(), and NSFileSystem::TFSFileSystem::TFSFileSystem(). Here is the call graph for this function: ![]() |
|
Releases this list. Only sets number of items to 0 - memory is still allocated for one pointer! For all pointers is call operator DELETE. Definition at line 158 of file ArrayPtrs.h. References TMemManager::free_align(). Referenced by NSMeshes::TDeclarationManager::Initialize(), and NSXLoader::TXLoader::LoadFile(). Here is the call graph for this function: ![]() |
|
Releases this list. Only sets number of items to 0! Array of pointers is still allocated. For all pointers is call operator DELETE. Definition at line 186 of file ArrayPtrs.h. Referenced by NSConfigFile::TConfigFile::LoadConfigFile(), and NSConfigFile::TConfigFile::LoadConfigFileFromVFS(). |
|
Releases this list without calling DELETE on items. Only sets number of items to 0! Array of pointers is still allocated. Definition at line 206 of file ArrayPtrs.h. |
|
Returns number of items in list.
Definition at line 244 of file ArrayPtrs.h. Referenced by NSFileSystem::TFSFileSystem::GetRegisteredCabinetCount(), NSFileSystem::TFSFileSystem::GetRegisteredPathCount(), NSFileSystem::TFSCabinetTable::IsFileInCabinet(), and NSConfigFile::TConfigFileSection::WriteToFile(). |
|
Returns number of allocated items.
Definition at line 254 of file ArrayPtrs.h. |
|
Return pointer to array of items stored in this list!!!
Definition at line 570 of file ArrayPtrs.h. |
|
Return pointer to array of items stored in this list!!!
Definition at line 560 of file ArrayPtrs.h. |
|
Gets item on desired index. Creates new item with copy constructor!!! Please use GetItemRef() or operator=() for reference getting. Index must be in range <0,count-1>!!!!
Definition at line 488 of file ArrayPtrs.h. References DBGASSERT. Referenced by NSXLoader::TXLoader::GetFrame(), NSXLoader::TXLoader::GetFrameByName(), and TGraphicTexture::GetMipMap(). |
|
Gets reference to item on desired index. Index must be in range <0,count-1>
Definition at line 518 of file ArrayPtrs.h. References DBGASSERT. |
|
Gets reference to item on desired index. Index must be in range <0,count-1>
Definition at line 503 of file ArrayPtrs.h. References DBGASSERT. |
|
Return size of one item in this array.
Definition at line 109 of file ArrayPtrs.h. |
|
|
Sorting function sort two items func(a,b): Be carefull - items must be pointers to pointers!!!
* < 0 .... a < b * = 0 .... a = b * > 0 .... a > b * |
|
Determine whether specified item is inside array.
Definition at line 580 of file ArrayPtrs.h. References TRUE. |
|
fake assignment operator
|
|
Gets reference to item on desired index. Index must be in range <0,count-1>
Definition at line 548 of file ArrayPtrs.h. References DBGASSERT. |
|
Gets reference to item on desired index. Index must be in range <0,count-1>
Definition at line 533 of file ArrayPtrs.h. References DBGASSERT. |
|
Remove specified item from array. Its removed first item with specified address!!! Item is destroyed via operator delete.
Definition at line 308 of file ArrayPtrs.h. |
|
Remove item with given index from array. Item is destroyed via operator delete.
Definition at line 283 of file ArrayPtrs.h. References DBGASSERT. |
|
Remove specified item from array. Its removed first item with specified address!!! Item is destroyed via operator delete. This method change order of items in array because last item is set to position of removed item.
Definition at line 402 of file ArrayPtrs.h. |
|
Remove item with given index from array. This methods change order of items in list!!! Last item is set to deleted item. Item is destroyed via operator delete.
Definition at line 378 of file ArrayPtrs.h. References DBGASSERT. Referenced by NSConfigFile::TConfigFileSection::Remove(). |
|
Remove specified item from array without calling operator delete on it. Due this reason item is returned. If item is not cointained inside array NULL is returnded. This method change order of item inside array. Its removed first item with specified address!!!
Definition at line 433 of file ArrayPtrs.h. |
|
Remove specified item from array without calling operator delete on it. Due this reason item is returned. If item is not cointained inside array NULL is returnded. Its removed first item with specified address!!!
Definition at line 337 of file ArrayPtrs.h. |
|
Remove last item in array. Item is destroyed via operator delete. Definition at line 468 of file ArrayPtrs.h. |
|
Resize array. Original array items are copy to new array. If size in parameter is less than actual size than new size is set to actual size thus methods do nothing. Items are copy via operator=.
Definition at line 617 of file ArrayPtrs.h. References TMemManager::new_align(). Referenced by TArrayPtrs< T, size, step >::AddItem(), NSShaders::TPixelShaderManager::DestroyUnreferencedShaders(), and NSShaders::TVertexShaderManager::DestroyUnreferencedShaders(). Here is the call graph for this function: ![]() |
|
Reverse order of items in array.
Definition at line 642 of file ArrayPtrs.h. References TMemManager::new_align(). Here is the call graph for this function: ![]() |
|
Returns number of items in list.
Definition at line 234 of file ArrayPtrs.h. Referenced by NSMeshes::TMeshManager::DestroyRendererResources(), NSFileSystem::TFSFileSystem::Exists(), NSFileSystem::TFSFileSystem::GetFile(), NSMeshes::TMeshManager::GetMesh(), NSMeshes::TDeclarationManager::Initialize(), and NSMeshes::TMeshManager::LoadRendererResources(). |
|
Sort this list by given sorting function. Sorting function sort two items func(a,b):
* < 0 .... a < b * = 0 .... a = b * > 0 .... a > b *
Definition at line 604 of file ArrayPtrs.h. |