#include <stvaluelist.h>
Public Member Functions | |
StValueList () | |
~StValueList () | |
void | push_back (const T &item) |
void | pop_back () |
void | push_front (const T &item) |
void | pop_front () |
void | addUnique (const T &item) |
void | addUnique (const StValueList< T > &list) |
int | find (const T &item) const |
int | contains (const T &item) const |
int | remove (const T &item) |
void | remove (unsigned index) |
void | clear () |
T & | at (unsigned index) const |
unsigned | size () const |
bool | empty () const |
StValueList & | operator<< (const T &item) |
StValueList & | operator<< (const StValueList< T > &list) |
T & | operator[] (unsigned index) |
const T & | operator[] (unsigned index) const |
Protected Member Functions | |
void | elementCreate (const T &data, void *placeToCopy) |
void | elementDestroy (void *memoryPointer) |
void | copy (void *mem, unsigned itemCount) |
void | copy (const StValueList< T > ©) |
void | copy () |
Protected Attributes | |
StSharedMemory | memory |
unsigned | itemCount |
Private Member Functions | |
void | init () |
Friends | |
class | StStringList |
Classes | |
struct | Element |
It works very similiarly to the vector class from STD library but doesn't have iterators yet. If you want to create StValueList<StString>, the better way is to use the StStringList class, which allows you to load and save lines of your strings into files.
StValueList< T >::StValueList | ( | ) | [inline] |
StValueList< T >::~StValueList | ( | ) | [inline] |
void StValueList< T >::addUnique | ( | const StValueList< T > & | list | ) | [inline] |
Adds only these list items that are new to this list
void StValueList< T >::addUnique | ( | const T & | item | ) | [inline] |
Adds item only if new in list
T & StValueList< T >::at | ( | unsigned | index | ) | const [inline] |
void StValueList< T >::clear | ( | ) | [inline] |
Clear whole list
Reimplemented in StScript.
int StValueList< T >::contains | ( | const T & | item | ) | const [inline] |
void StValueList< T >::copy | ( | ) | [protected] |
void StValueList< T >::copy | ( | const StValueList< T > & | copy | ) | [protected] |
void StValueList< T >::copy | ( | void * | mem, | |
unsigned | itemCount | |||
) | [protected] |
void StValueList< T >::elementCreate | ( | const T & | data, | |
void * | placeToCopy | |||
) | [inline, protected] |
void StValueList< T >::elementDestroy | ( | void * | memoryPointer | ) | [inline, protected] |
bool StValueList< T >::empty | ( | ) | const [inline] |
int StValueList< T >::find | ( | const T & | item | ) | const [inline] |
void StValueList< T >::init | ( | ) | [inline, private] |
Reimplemented in StStringList.
StValueList< T > & StValueList< T >::operator<< | ( | const StValueList< T > & | list | ) | [inline] |
StValueList& StValueList< T >::operator<< | ( | const T & | item | ) | [inline] |
const T& StValueList< T >::operator[] | ( | unsigned | index | ) | const [inline] |
T& StValueList< T >::operator[] | ( | unsigned | index | ) | [inline] |
void StValueList< T >::pop_back | ( | ) | [inline] |
Delete first item
void StValueList< T >::pop_front | ( | ) | [inline] |
Delete last item
void StValueList< T >::push_back | ( | const T & | item | ) | [inline] |
Insert copy of item at the end of list
void StValueList< T >::push_front | ( | const T & | item | ) | [inline] |
Insert copy of item at the begining of list
void StValueList< T >::remove | ( | unsigned | index | ) | [inline] |
Remove item on index
int StValueList< T >::remove | ( | const T & | item | ) | [inline] |
Delete all items that are equal to item
unsigned StValueList< T >::size | ( | ) | const [inline] |
friend class StStringList [friend] |
unsigned StValueList< T >::itemCount [protected] |
StSharedMemory StValueList< T >::memory [protected] |