csArrayCapacityLinear< Threshold > Class Template Reference
[Containers]
csArray capacity handler.
More...
#include <csutil/array.h>
Public Member Functions | |
csArrayCapacityLinear (const size_t x) | |
Construct capacity handler with a given size_t parameter for the Threshold object. | |
size_t | GetCapacity (size_t count) const |
Compute the capacity for a given number of items. | |
bool | IsCapacityExcessive (size_t capacity, size_t count) const |
Returns "true" if the given capacity is too large for the given count, that is, if GetCapacity() would return a value for count smaller than capacity. | |
csArrayCapacityLinear (const Threshold &threshold) | |
csArrayCapacityLinear () | |
Construct capacity handler. |
Detailed Description
template<typename Threshold = csArrayThresholdVariable>
class csArrayCapacityLinear< Threshold >
csArray capacity handler.
Different capacity handlers allow to realize different csArray internal growth behaviours, if needed. This default "linear" handler will result in array capacity growth to multiples of Threshold and works well enough in most cases.
Definition at line 278 of file array.h.
Constructor & Destructor Documentation
template<typename Threshold = csArrayThresholdVariable>
csArrayCapacityLinear< Threshold >::csArrayCapacityLinear | ( | ) | [inline] |
template<typename Threshold = csArrayThresholdVariable>
csArrayCapacityLinear< Threshold >::csArrayCapacityLinear | ( | const size_t | x | ) | [inline] |
Member Function Documentation
template<typename Threshold = csArrayThresholdVariable>
size_t csArrayCapacityLinear< Threshold >::GetCapacity | ( | size_t | count | ) | const [inline] |
template<typename Threshold = csArrayThresholdVariable>
bool csArrayCapacityLinear< Threshold >::IsCapacityExcessive | ( | size_t | capacity, | |
size_t | count | |||
) | const [inline] |
Returns "true" if the given capacity is too large for the given count, that is, if GetCapacity() would return a value for count smaller than capacity.
The documentation for this class was generated from the following file:
- csutil/array.h
Generated for Crystal Space by doxygen 1.4.7