ivutils
Loading...
Searching...
No Matches
data_pack< T, comp_pr, set_t, index_t > Class Template Reference

Class for packing data of the type T. More...

#include <seqpack.h>

Inheritance diagram for data_pack< T, comp_pr, set_t, index_t >:
Collaboration diagram for data_pack< T, comp_pr, set_t, index_t >:

Classes

class  iterator
 packer for indices of stored elements in vset More...
 

Public Member Functions

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

index_pack< index_t > ipack
 container for unique values of packed data
 

Detailed Description

template<class T, class comp_pr = std::equal_to<T>, class set_t = vector_set<T, comp_pr>, class index_t = std::ptrdiff_t>
class data_pack< T, comp_pr, set_t, index_t >

Class for packing data of the type T.

Data is placed to some container set_t which stores only unique values. Iterative access to packed data is regulated by packer of integers int_pack which stores indices of packed elements in container set_t. set_t can be container_set<T, container_t> (vector_set or list_set). The comparison predicate is of type comp_pr which must have bool operator()(const T&,const T&) returning true for duplicated items


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