#include <Container.hpp>
Pros : Fastest possible access time once constructed (as fast as pointer dereferencing). Element order is always preserved. Cons : Construction / Adding and Remove operations are slow because copying is done on per element basis
For usage,
Public Member Functions | |
| void | Append (const T &ref) throw () |
| Append an element to the end of the array. | |
| Array (const Array &other) | |
| Copy constructor. | |
| Array () | |
| Default Constructor. | |
| void | Clear () |
| Clear the array, and destruct any remaining objects. | |
| const T & | getElementAtUncheckedPosition (uint32 index) const |
| Fast access operator, but doesn't check the index given in. | |
| T & | getElementAtUncheckedPosition (uint32 index) |
| Fast access operator, but doesn't check the index given in. | |
| size_t | getSize () const |
| Access size member. | |
| uint32 | indexOf (const T &objectToSearch) |
| Search operator. | |
| void | insertBefore (uint32 index, const T &ref) throw () |
| Insert an element just before the given index. | |
| uint32 | lastIndexOf (const T &objectToSearch) |
| Reverse search operator. | |
| const Array & | operator= (const Array &other) |
| Classic copy operator. | |
| bool | operator== (const Array &other) |
| Compare operator. | |
| const T & | operator[] (uint32 index) const |
| Access operator. | |
| T & | operator[] (uint32 index) |
| Access operator. | |
| void | Remove (uint32 index) throw () |
| Remove an object from the array. | |
| ~Array () | |
| Destructor. | |
| Container::PrivateGenericImplementation::Array< T, Policy, ExactSize >::Array | ( | ) | [inline] |
Default Constructor.
| Container::PrivateGenericImplementation::Array< T, Policy, ExactSize >::Array | ( | const Array< T, Policy, ExactSize > & | other | ) | [inline] |
Copy constructor.
| Container::PrivateGenericImplementation::Array< T, Policy, ExactSize >::~Array | ( | ) | [inline] |
Destructor.
| void Container::PrivateGenericImplementation::Array< T, Policy, ExactSize >::Append | ( | const T & | ref | ) | throw () [inline] |
Append an element to the end of the array.
| void Container::PrivateGenericImplementation::Array< T, Policy, ExactSize >::Clear | ( | ) | [inline] |
Clear the array, and destruct any remaining objects.
| const T& Container::PrivateGenericImplementation::Array< T, Policy, ExactSize >::getElementAtUncheckedPosition | ( | uint32 | index | ) | const [inline] |
Fast access operator, but doesn't check the index given in.
| T& Container::PrivateGenericImplementation::Array< T, Policy, ExactSize >::getElementAtUncheckedPosition | ( | uint32 | index | ) | [inline] |
Fast access operator, but doesn't check the index given in.
| size_t Container::PrivateGenericImplementation::Array< T, Policy, ExactSize >::getSize | ( | ) | const [inline] |
Access size member.
| uint32 Container::PrivateGenericImplementation::Array< T, Policy, ExactSize >::indexOf | ( | const T & | objectToSearch | ) | [inline] |
Search operator.
| objectToSearch | The object to look for in the array |
| void Container::PrivateGenericImplementation::Array< T, Policy, ExactSize >::insertBefore | ( | uint32 | index, | |
| const T & | ref | |||
| ) | throw () [inline] |
Insert an element just before the given index.
| index | Zero based index of the element once inserted |
| uint32 Container::PrivateGenericImplementation::Array< T, Policy, ExactSize >::lastIndexOf | ( | const T & | objectToSearch | ) | [inline] |
Reverse search operator.
| objectToSearch | The object to look for in the array |
| const Array& Container::PrivateGenericImplementation::Array< T, Policy, ExactSize >::operator= | ( | const Array< T, Policy, ExactSize > & | other | ) | [inline] |
Classic copy operator.
| bool Container::PrivateGenericImplementation::Array< T, Policy, ExactSize >::operator== | ( | const Array< T, Policy, ExactSize > & | other | ) | [inline] |
Compare operator.
| const T& Container::PrivateGenericImplementation::Array< T, Policy, ExactSize >::operator[] | ( | uint32 | index | ) | const [inline] |
Access operator.
| index | The position in the array |
| T& Container::PrivateGenericImplementation::Array< T, Policy, ExactSize >::operator[] | ( | uint32 | index | ) | [inline] |
Access operator.
| index | The position in the array |
| void Container::PrivateGenericImplementation::Array< T, Policy, ExactSize >::Remove | ( | uint32 | index | ) | throw () [inline] |
Remove an object from the array.
| index | Zero based index of the object to remove |
