Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- template<typename VALUE>
- class List {
- int m_MaxChunkSize;
- int m_CurrentChunkSize;
- int m_EntryCount;
- bool _CreateChunk();
- VALUE** m_ChunkArray;
- public:
- static const int& DEFAULT_CHUNK_COUNT;
- List(int DEFAULT_CHUNK_COUNT);
- List();
- ~List();
- int Count();
- void Add(const VALUE& value);
- bool Remove(int index);
- bool Remove(const VALUE& value, bool all = false);
- bool Insert(const VALUE& value, int index);
- int Find(const VALUE& value, int startPos);
- int Find(const VALUE& value);
- VALUE & Get(int index);
- //vector<VALUE*> Get();
- void Clear();
- VALUE& operator[] (int index);
- int operator[] (const VALUE& value);
- VALUE& operator* () { return **m_ChunkArray; }
- void operator++ () { ++m_ChunkArray; }
- VALUE** begin() { m_ChunkArray[0]; }
- VALUE** end() { return m_ChunkArray[m_EntryCount]; }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement