template<typename TIntegral>
class alib::bitbuffer::ac_v1::ArrayCompressor::Array< TIntegral >
Helper class that allows access the array data. The design goal for introducing this class (instead of providing array references in the interface methods) is to allow a minimum of flexibility in respect to the data provision, while not using callback functions (or virtual methods) to access each single array element.
The approach implemented here, allows the array value to be a single attribute residing in an array of structs. For this, besides a base pointer to the first value and the length of the array, the distance between two values within the array of structs (or classes) has to be given.
By nature, to do this, basic pointer manipulation is needed, which imposes the need using char*
values internally, which are casted back to the source type with setters/getters.
Consequently, templated constructors are given, which accept array types to restrict such pointer conversion within the type.
- Note
- In the case an application uses a more complex data scheme for storing array data to be compressed, which are not accessible with this simple mechanism, such data has to be written into temporary arrays before compression.
Besides this, this accessor type, provides a transparent inline conversion of signed integer values to its unsigned counterparts by performing "zig zag encoding".
- Template Parameters
-
TIntegral | The integral array type. |
Definition at line 107 of file ac.hpp.