#include <src/Enum/_Enumerator.hpp>
List of all members.
template<typename T>
class Enumerable< T >
Constructor & Destructor Documentation
Member Function Documentation
template<typename T>
static void Enumerable< T >::ClearArray |
( |
| ) |
[inline, static] |
{
for(int i = Array.Count - 1; i >= 0; --i) {
delete Array[i];
Array.RemoveItem(i);
}
}
template<typename T>
static T* Enumerable< T >::Find |
( |
const char * |
Title | ) |
[inline, static] |
template<typename T>
static int Enumerable< T >::FindIndex |
( |
const char * |
Title | ) |
[inline, static] |
{
for(int i = 0; i < Array.Count; ++i)
if(!_strcmpi(Title, Array.GetItem(i)->Name))
return i;
return -1;
}
template<typename T>
static T* Enumerable< T >::FindOrAllocate |
( |
const char * |
Title | ) |
[inline, static] |
{
T *find = Find(Title);
return find ? find : new T(Title);
}
template<typename T>
static const char* Enumerable< T >::GetMainSection |
( |
| ) |
[static] |
template<typename T>
static void Enumerable< T >::LoadFromINIList |
( |
CCINIClass * |
pINI | ) |
[inline, static] |
{
const char *section = GetMainSection();
int len = pINI->GetKeyCount(section);
for(int i = 0; i < len; ++i) {
const char *Key = pINI->GetKeyName(section, i);
FindOrAllocate(Key);
}
for(int i = 0; i < Array.Count; ++i) {
Array[i]->LoadFromINI(pINI);
}
}
template<typename T>
static T** Enumerable< T >::stl_Find |
( |
const char * |
Title | ) |
[inline, static] |
{
return std::find_if(Array.start(), Array.end(), std::bind2nd(comparator(), Title));
}
Member Data Documentation
The documentation for this class was generated from the following file: