![]() |
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, UseNew > |
| 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 growing strategy applied by its resize procedure and a flag stating if the memory allocation should be done in old C style (realloc / free) or in the new C++ style (operators new[] / delete[]). Using the old style is the default and allows us to, hopefully, benefit from realloc(). That can be an issue when using the takeData() method to transfer data ownership to other classes expecting to be able to release memory with operator delete[]. For those cases, set UseNew to true. 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). | |
Implementation of the GmPODVector template class.