![]() |
GemaCoreLib
The GeMA Core library
|
Implementation of the GmPODVector template class. More...
Go to the source code of this file.
Classes | |
class | GmPODVector< T, ControlSize, Grow > |
A simple vector for Plain Old Data (POD) types with the control size variable type parameterized to allow for a smaller class size with ControlSize = unsigned int, with smaller vector size limits, or for a bigger class with ControlSize = size_t. Also receives as parameter the default gorwing strategy applied by its resize procedure. More... | |
Typedefs | |
typedef size_t(* | GmPODGrowT) (size_t s, size_t a) |
The type for the vector growing function used by GmPODVector. Parameter s is the desired number of items for the vector. Parameter a is the current available number of items in the vector and a < s. The function should return the new number of allocated items, making sure that it doesn't overflows the maximum value of the type used to control vector sizes (ControlSize parameter for the vector template). | |
Functions | |
template<class ControlSize > | |
size_t | GmPODVectorSlowGrow (size_t s, size_t a) |
Vector growing by 25% of the current size. | |
template<class ControlSize > | |
size_t | GmPODVectorStdGrow (size_t s, size_t a) |
Vector growing by 50% of the current size. | |
template<class ControlSize > | |
size_t | GmPODVectorFastGrow (size_t s, size_t a) |
Vector growing by 100% of the current size. | |
size_t | GmPODVectorTightGrow (size_t s, size_t a) |
Vector growing to exactly the needed size. | |
Implementation of the GmPODVector template class.