![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <Decoder.h>


Public Member Functions | |
| void | destBufferSetNew (std::vector< SourceDestBuffer > &dbufs) override |
| uint64_t | totalRecordsCompleted () override |
| size_t | inputProcess (const char *source, const size_t availableByteCount) override |
| virtual size_t | inputProcessAligned (const char *inbuf, const size_t firstBit, const size_t endBit)=0 |
| void | stateReset () override |
| void | dump (int indent=0, std::ostream &os=std::cout) override |
Public Member Functions inherited from e57::Decoder | |
| Decoder ()=delete | |
| virtual | ~Decoder ()=default |
| unsigned | bytestreamNumber () const |
Protected Member Functions | |
| BitpackDecoder (unsigned bytestreamNumber, SourceDestBuffer &dbuf, unsigned alignmentSize, uint64_t maxRecordCount) | |
| void | inBufferShiftDown () |
Protected Member Functions inherited from e57::Decoder | |
| Decoder (unsigned bytestreamNumber) | |
Protected Attributes | |
| uint64_t | currentRecordIndex_ = 0 |
| uint64_t | maxRecordCount_ = 0 |
| std::shared_ptr< SourceDestBufferImpl > | destBuffer_ |
| std::vector< char > | inBuffer_ |
| size_t | inBufferFirstBit_ = 0 |
| size_t | inBufferEndByte_ = 0 |
| unsigned int | inBufferAlignmentSize_ |
| unsigned int | bitsPerWord_ |
| unsigned int | bytesPerWord_ |
Protected Attributes inherited from e57::Decoder | |
| unsigned int | bytestreamNumber_ |
Additional Inherited Members | |
Static Public Member Functions inherited from e57::Decoder | |
| static std::shared_ptr< Decoder > | DecoderFactory (unsigned bytestreamNumber, const CompressedVectorNodeImpl *cVector, std::vector< SourceDestBuffer > &dbufs, const ustring &codecPath) |
|
protected |
Definition at line 191 of file Decoder.cpp.
|
overridevirtual |
Implements e57::Decoder.
Definition at line 199 of file Decoder.cpp.
References destBuffer_, e57::E57_ERROR_INTERNAL, E57_EXCEPTION2, and e57::toString().
|
overridevirtual |
Implements e57::Decoder.
Reimplemented in e57::BitpackIntegerDecoder< RegisterT >, e57::BitpackStringDecoder, and e57::BitpackFloatDecoder.
Definition at line 324 of file Decoder.cpp.
References bitsPerWord_, bytesPerWord_, e57::Decoder::bytestreamNumber_, currentRecordIndex_, destBuffer_, QtCompat::endl(), inBuffer_, inBufferAlignmentSize_, inBufferEndByte_, inBufferFirstBit_, maxRecordCount_, and e57::space().
Referenced by e57::BitpackFloatDecoder::dump(), e57::BitpackStringDecoder::dump(), and e57::BitpackIntegerDecoder< RegisterT >::dump().
|
protected |
Move uneaten data down to beginning of inBuffer_. Keep on natural boundaries. Moves all of word that contains inBufferFirstBit.
Overlapping regions ok with memmove().
Update indexes
Definition at line 297 of file Decoder.cpp.
References bitsPerWord_, bytesPerWord_, e57::E57_ERROR_INTERNAL, E57_EXCEPTION2, inBuffer_, inBufferEndByte_, inBufferFirstBit_, and e57::toString().
Referenced by inputProcess().
|
overridevirtual |
Copy input bytes from caller, if any
Advance tail pointer.
Update amount available from caller
??? fix doc for new bit interface Now that we have input stored in an aligned buffer, call derived class to try to eat some Note that end of filled buffer may not be at a natural boundary. The subclass may transfer this partial word in a full word transfer, but it must be carefull to only use the defined bits. inBuffer_ is a multiple of largest word size, so this full word transfer off the end will always be in defined memory.
Shift uneaten data to beginning of inBuffer_, keep on natural word boundaries.
If the lower level processing didn't eat anything on this iteration, stop looping and tell caller how much we ate or stored.
Return the number of bytes we ate/saved.
Implements e57::Decoder.
Definition at line 209 of file Decoder.cpp.
References bitsPerWord_, bytesPerWord_, e57::E57_ERROR_INTERNAL, E57_EXCEPTION2, QtCompat::endl(), inBuffer_, inBufferEndByte_, inBufferFirstBit_, inBufferShiftDown(), inputProcessAligned(), min(), and e57::toString().
|
pure virtual |
Implemented in e57::BitpackIntegerDecoder< RegisterT >, e57::BitpackStringDecoder, and e57::BitpackFloatDecoder.
Referenced by inputProcess().
|
overridevirtual |
Implements e57::Decoder.
Definition at line 291 of file Decoder.cpp.
References inBufferEndByte_, and inBufferFirstBit_.
|
inlineoverridevirtual |
|
protected |
Definition at line 94 of file Decoder.h.
Referenced by dump(), inBufferShiftDown(), and inputProcess().
|
protected |
Definition at line 95 of file Decoder.h.
Referenced by dump(), inBufferShiftDown(), and inputProcess().
|
protected |
Definition at line 85 of file Decoder.h.
Referenced by dump(), e57::BitpackFloatDecoder::inputProcessAligned(), e57::BitpackStringDecoder::inputProcessAligned(), and totalRecordsCompleted().
|
protected |
Definition at line 88 of file Decoder.h.
Referenced by destBufferSetNew(), dump(), e57::BitpackFloatDecoder::inputProcessAligned(), and e57::BitpackStringDecoder::inputProcessAligned().
|
protected |
Definition at line 90 of file Decoder.h.
Referenced by dump(), inBufferShiftDown(), and inputProcess().
|
protected |
|
protected |
Definition at line 92 of file Decoder.h.
Referenced by dump(), inBufferShiftDown(), inputProcess(), and stateReset().
|
protected |
Definition at line 91 of file Decoder.h.
Referenced by dump(), inBufferShiftDown(), inputProcess(), and stateReset().
|
protected |
Definition at line 86 of file Decoder.h.
Referenced by dump(), e57::BitpackFloatDecoder::inputProcessAligned(), and e57::BitpackStringDecoder::inputProcessAligned().