e57::ConstantIntegerEncoder Class Reference

#include <Encoder.h>

Public Member Functions

float bitsPerRecord () override
 
 ConstantIntegerEncoder (unsigned bytestreamNumber, SourceDestBuffer &sbuf, int64_t minimum)
 
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
 
bool registerFlushToOutput () override
 
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 Attributes

uint64_t currentRecordIndex_
 
int64_t minimum_
 
std::shared_ptr< SourceDestBufferImplsourceBuffer_
 
- Protected Attributes inherited from e57::Encoder
unsigned bytestreamNumber_
 

Additional Inherited Members

- Static Public Member Functions inherited from e57::Encoder
static std::shared_ptr< EncoderEncoderFactory (unsigned bytestreamNumber, std::shared_ptr< CompressedVectorNodeImpl > cVector, std::vector< SourceDestBuffer > &sbuf, ustring &codecPath)
 
- Protected Member Functions inherited from e57::Encoder
 Encoder (unsigned bytestreamNumber)
 

Constructor & Destructor Documentation

◆ ConstantIntegerEncoder()

ConstantIntegerEncoder::ConstantIntegerEncoder ( unsigned  bytestreamNumber,
SourceDestBuffer sbuf,
int64_t  minimum 
)

Member Function Documentation

◆ bitsPerRecord()

float ConstantIntegerEncoder::bitsPerRecord ( )
overridevirtual

We don't produce any output

Implements e57::Encoder.

◆ currentRecordIndex()

uint64_t ConstantIntegerEncoder::currentRecordIndex ( )
overridevirtual

Implements e57::Encoder.

References currentRecordIndex_.

◆ outputAvailable()

size_t ConstantIntegerEncoder::outputAvailable ( ) const
overridevirtual

We don't produce any output

Implements e57::Encoder.

◆ outputClear()

void ConstantIntegerEncoder::outputClear ( )
overridevirtual

get data from encoder

Implements e57::Encoder.

◆ outputGetMaxSize()

size_t ConstantIntegerEncoder::outputGetMaxSize ( )
overridevirtual

We don't produce any output

Implements e57::Encoder.

◆ outputRead()

void ConstantIntegerEncoder::outputRead ( char *  dest,
const size_t  byteCount 
)
overridevirtual

number of bytes that can be read

Should never request any output data

Implements e57::Encoder.

References e57::E57_ERROR_INTERNAL, and e57::toString().

◆ outputSetMaxSize()

void ConstantIntegerEncoder::outputSetMaxSize ( unsigned  byteCount)
overridevirtual

Ignore, since don't produce any output

Implements e57::Encoder.

◆ processRecords()

uint64_t ConstantIntegerEncoder::processRecords ( size_t  recordCount)
overridevirtual

Check that all source values are == minimum_

Update counts of records processed

Implements e57::Encoder.

References currentRecordIndex_, e57::E57_ERROR_VALUE_OUT_OF_BOUNDS, minimum_, sourceBuffer_, and e57::toString().

◆ registerFlushToOutput()

bool ConstantIntegerEncoder::registerFlushToOutput ( )
overridevirtual

Implements e57::Encoder.

◆ sourceBufferNextIndex()

unsigned ConstantIntegerEncoder::sourceBufferNextIndex ( )
overridevirtual

Implements e57::Encoder.

References sourceBuffer_.

◆ sourceBufferSetNew()

void ConstantIntegerEncoder::sourceBufferSetNew ( std::vector< SourceDestBuffer > &  sbufs)
overridevirtual

Verify that this encoder only has single input buffer

Implements e57::Encoder.

References e57::E57_ERROR_INTERNAL, sourceBuffer_, and e57::toString().

Member Data Documentation

◆ currentRecordIndex_

uint64_t e57::ConstantIntegerEncoder::currentRecordIndex_
protected

◆ minimum_

int64_t e57::ConstantIntegerEncoder::minimum_
protected

Referenced by processRecords().

◆ sourceBuffer_

std::shared_ptr<SourceDestBufferImpl> e57::ConstantIntegerEncoder::sourceBuffer_
protected

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