Electromagnetic Template Library (EMTL)
Loading...
Searching...
No Matches
emtPacker Class Reference

Basic packer class sceleton. More...

#include <emtempl.h>

Public Types

typedef T0 iterator
 iterator conforming to emtIterator
 
typedef T1 value_t
 type returned by iterator::operator*()
 
typedef T2 record_t
 type supplied to next_record()
 

Public Member Functions

int start_record ()
 start recording
 
int next_record (const record_t &rec)
 supply next record
 
int end_record ()
 finish recording
 
iterator begin () const
 Get beginning of the sequence Generally valid only after finished recording.
 
iterator end () const
 Get end of the sequence Generally valid only after finished recording.
 
size_t packed_size () const
 Returns the packed size in bytes ignoring management overheads.
 
size_t size () const
 Returns the number of elements in the sequence.
 
void clear ()
 Clears the container, enables recording of a new sequence.
 

Detailed Description

Basic packer class sceleton.

Packers usually use classes from seqpack.h The purpose of packer is to store a sequence of records in (presumably) packed form and provide an iterator for retrieving this sequence in the same order as recorded.

Member Function Documentation

◆ end_record()

int emtPacker::end_record ( )

finish recording

Returns
<0 in case of an error

◆ next_record()

int emtPacker::next_record ( const record_t rec)

supply next record

Returns
<0 in case of an error

◆ start_record()

int emtPacker::start_record ( )

start recording

Returns
<0 in case of an error

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