#include <Encoder.h>
Public Member Functions | |
float | bitsPerRecord () override=0 |
uint64_t | currentRecordIndex () override |
size_t | outputAvailable () const override |
void | outputClear () override |
get data from encoder More... | |
size_t | outputGetMaxSize () override |
void | outputRead (char *dest, const size_t byteCount) override |
number of bytes that can be read More... | |
void | outputSetMaxSize (unsigned byteCount) override |
uint64_t | processRecords (size_t recordCount) override=0 |
bool | registerFlushToOutput () override=0 |
unsigned | sourceBufferNextIndex () override |
void | sourceBufferSetNew (std::vector< SourceDestBuffer > &sbufs) override |
Public Member Functions inherited from e57::Encoder | |
virtual float | bitsPerRecord ()=0 |
unsigned | bytestreamNumber () const |
virtual uint64_t | currentRecordIndex ()=0 |
virtual size_t | outputAvailable () const =0 |
virtual void | outputClear ()=0 |
get data from encoder More... | |
virtual size_t | outputGetMaxSize ()=0 |
virtual void | outputRead (char *dest, const size_t byteCount)=0 |
number of bytes that can be read More... | |
virtual void | outputSetMaxSize (unsigned byteCount)=0 |
virtual uint64_t | processRecords (size_t recordCount)=0 |
virtual bool | registerFlushToOutput ()=0 |
virtual unsigned | sourceBufferNextIndex ()=0 |
virtual void | sourceBufferSetNew (std::vector< SourceDestBuffer > &sbufs)=0 |
virtual | ~Encoder ()=default |
Protected Member Functions | |
BitpackEncoder (unsigned bytestreamNumber, SourceDestBuffer &sbuf, unsigned outputMaxSize, unsigned alignmentSize) | |
================ More... | |
void | outBufferShiftDown () |
Protected Member Functions inherited from e57::Encoder | |
Encoder (unsigned bytestreamNumber) | |
Protected Attributes | |
uint64_t | currentRecordIndex_ |
std::vector< char > | outBuffer_ |
size_t | outBufferAlignmentSize_ |
size_t | outBufferEnd_ |
size_t | outBufferFirst_ |
std::shared_ptr< SourceDestBufferImpl > | sourceBuffer_ |
Protected Attributes inherited from e57::Encoder | |
unsigned | bytestreamNumber_ |
Additional Inherited Members | |
Static Public Member Functions inherited from e57::Encoder | |
static std::shared_ptr< Encoder > | EncoderFactory (unsigned bytestreamNumber, std::shared_ptr< CompressedVectorNodeImpl > cVector, std::vector< SourceDestBuffer > &sbuf, ustring &codecPath) |
|
protected |
================
|
overridepure virtual |
Implements e57::Encoder.
Implemented in e57::BitpackFloatEncoder, e57::BitpackStringEncoder, and e57::BitpackIntegerEncoder< RegisterT >.
|
overridevirtual |
Implements e57::Encoder.
References currentRecordIndex_.
|
protected |
Move data down closer to beginning of outBuffer_. But keep outBufferEnd_ as a multiple of outBufferAlignmentSize_. This ensures that writes into buffer can occur on natural boundaries. Otherwise some CPUs will fault.
Buffer is empty, reset indices to 0
Round newEnd up to nearest multiple of outBufferAlignmentSize_.
Double check round up worked
Be paranoid before memory copy
Move available data down closer to beginning of outBuffer_. Overlapping regions ok with memmove().
Update indexes
References e57::E57_ERROR_INTERNAL, outBuffer_, outBufferAlignmentSize_, outBufferEnd_, outBufferFirst_, outputAvailable(), and e57::toString().
Referenced by e57::BitpackFloatEncoder::processRecords(), and e57::BitpackStringEncoder::processRecords().
|
overridevirtual |
Implements e57::Encoder.
References outBufferEnd_, and outBufferFirst_.
Referenced by outBufferShiftDown(), and outputRead().
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
number of bytes that can be read
Check we have enough bytes in queue
Copy output bytes to caller
Advance head pointer.
Don't slide remaining data down now, wait until do some more processing (that's when data needs to be aligned).
Implements e57::Encoder.
References e57::E57_ERROR_INTERNAL, outBuffer_, outBufferFirst_, outputAvailable(), and e57::toString().
|
overridevirtual |
Ignore if trying to shrink buffer (queue might get messed up).
Implements e57::Encoder.
References outBuffer_.
|
overridepure virtual |
Implements e57::Encoder.
Implemented in e57::BitpackFloatEncoder, e57::BitpackStringEncoder, and e57::BitpackIntegerEncoder< RegisterT >.
|
overridepure virtual |
Implements e57::Encoder.
Implemented in e57::BitpackFloatEncoder, e57::BitpackStringEncoder, and e57::BitpackIntegerEncoder< RegisterT >.
|
overridevirtual |
Implements e57::Encoder.
References sourceBuffer_.
|
overridevirtual |
Verify that this encoder only has single input buffer
Implements e57::Encoder.
References e57::E57_ERROR_INTERNAL, sourceBuffer_, and e57::toString().
|
protected |
|
protected |
|
protected |
Referenced by outBufferShiftDown().
|
protected |
|
protected |
Referenced by outBufferShiftDown(), outputAvailable(), outputClear(), and outputRead().
|
protected |