ivutils
Loading...
Searching...
No Matches
group_unpacked< T, cont_t, index_t > Class Template Reference

Stores groups of data in some container of the the type cont_t Number of elements in a group is packed in npack. More...

#include <seqpack.h>

Inheritance diagram for group_unpacked< T, cont_t, index_t >:
Collaboration diagram for group_unpacked< T, cont_t, index_t >:

Public Member Functions

template<class packer_t >
index_t aux_depends_on (const packer_t &other)
 this allows to share auxiliary data with other packer THE PACKERS MUST BE SYNCRONIZED EXTERNALLY: next_group must be called in sync with parent packer USE WITH CARE
 
template<class rec_it >
index_t next_group (rec_it beg, index_t n=1)
 put a group of n elements starting from beg packing the group with 0 elements will lead to the following behaviour when unpacked: get_group_count(it) will return 0, *it will return the next recorded element (if it exists) then after ++it, *it will return the same element, but get_group_count(it) will return the next group count THE ELEMENTS POINTED BY BEG WILL NOT BE RECORDED WHEN n=0 DO NOT USE *it if get_group_count(it) returns 0!
 
std::size_t packed_size () const
 returns the size in bytes ignoring vector overheads
 
std::size_t data_size () const
 returns full unpacked sequence size in bytes
 
- Public Member Functions inherited from data_unpacked< T, cont_t, index_t >
template<class rec_it >
index_t next_group (rec_it beg, index_t n=1)
 put a group of n elements starting with beg
 
std::size_t packed_size () const
 returns the size in bytes ignoring vector overheads
 
std::size_t data_size () const
 returns full unpacked sequence size in bytes
 

Protected Attributes

mngptr< data_unpacked< index_t > > npack
 packer of indices of last elements in cont_t in each packed group (not like in group_pack).
 

Detailed Description

template<class T, class cont_t = std::vector<T>, class index_t = std::ptrdiff_t>
class group_unpacked< T, cont_t, index_t >

Stores groups of data in some container of the the type cont_t Number of elements in a group is packed in npack.

Member Data Documentation

◆ npack

template<class T , class cont_t = std::vector<T>, class index_t = std::ptrdiff_t>
mngptr<data_unpacked<index_t> > group_unpacked< T, cont_t, index_t >::npack
protected

packer of indices of last elements in cont_t in each packed group (not like in group_pack).

this reference can be shared with some other group_unpacked


The documentation for this class was generated from the following file: