IODA Bundle
|
#include <Codec.h>
Public Member Functions | |
Codec (const std::string &name, api::ColumnType type) | |
virtual | ~Codec () |
virtual std::unique_ptr< Codec > | clone () |
const std::string & | name () const |
char * | encode (char *p, const double &d) |
virtual unsigned char * | encode (unsigned char *p, const double &d)=0 |
virtual void | decode (double *out)=0 |
virtual void | skip ()=0 |
void | setDataStream (GeneralDataStream &ds) |
virtual void | setDataStream (DataStream< SameByteOrder > &ds) |
virtual void | setDataStream (DataStream< OtherByteOrder > &ds) |
virtual void | clearDataStream ()=0 |
void | load (GeneralDataStream &ds) |
virtual void | load (DataStream< SameByteOrder > &ds) |
virtual void | load (DataStream< OtherByteOrder > &ds) |
void | save (GeneralDataStream &ds) |
virtual void | save (DataStream< SameByteOrder > &ds) |
virtual void | save (DataStream< OtherByteOrder > &ds) |
void | resetStats () |
virtual void | gatherStats (const double &v) |
void | hasMissing (bool h) |
int32_t | hasMissing () const |
void | min (double m) |
double | min () const |
void | max (double m) |
double | max () const |
void | missingValue (double v) |
double | missingValue () const |
virtual size_t | numStrings () const |
virtual void | copyStrings (Codec &rhs) |
virtual size_t | dataSizeDoubles () const |
virtual void | dataSizeDoubles (size_t count) |
Protected Attributes | |
std::string | name_ |
int32_t | hasMissing_ |
double | missingValue_ |
double | min_ |
double | max_ |
api::ColumnType | type_ |
Private Member Functions | |
virtual void | print (std::ostream &s) const |
Codec (const Codec &) | |
Codec & | operator= (const Codec &) |
Friends | |
std::ostream & | operator<< (std::ostream &s, const Codec &p) |
odc::core::Codec::Codec | ( | const std::string & | name, |
api::ColumnType | type | ||
) |
|
private |
|
pure virtual |
|
virtual |
Creates a clone of this codec. NOTE: the clone is not really usefull for coding/decoding, but has the same stats/missing values as the original codec, which can be useful sometimes.
Reimplemented in odc::codec::IntStringCodecBase< ByteOrder, InternalCodec >, odc::codec::IntStringCodecBase< ByteOrder, CodecInt8< ByteOrder, int64_t > >, odc::codec::IntStringCodecBase< ByteOrder, CodecInt16< ByteOrder, int64_t > >, and odc::codec::CodecChars< ByteOrder >.
Definition at line 32 of file Codec.cc.
|
inlinevirtual |
Reimplemented in odc::codec::CodecChars< ByteOrder >.
|
inlinevirtual |
Reimplemented in odc::codec::CodecChars< ByteOrder >.
Definition at line 79 of file Codec.h.
|
inlinevirtual |
Reimplemented in odc::codec::CodecChars< ByteOrder >.
Definition at line 80 of file Codec.h.
|
pure virtual |
Implemented in odc::codec::IntStringCodecBase< ByteOrder, InternalCodec >, odc::codec::IntStringCodecBase< ByteOrder, CodecInt8< ByteOrder, int64_t > >, odc::codec::IntStringCodecBase< ByteOrder, CodecInt16< ByteOrder, int64_t > >, odc::codec::CodecChars< ByteOrder >, odc::codec::ShortRealBase< ByteOrder, InternalMissing >, odc::codec::ShortRealBase< ByteOrder, real2MissingAsInt >, odc::codec::ShortRealBase< ByteOrder, minFloatAsInt >, odc::codec::CodecLongReal< ByteOrder >, odc::codec::BaseCodecMissing< ByteOrder, ValueType, InternalValueType, DerivedCodec >, odc::codec::BaseCodecMissing< ByteOrder, ValueType, uint8_t, CodecInt8Missing< ByteOrder, ValueType > >, odc::codec::BaseCodecMissing< ByteOrder, ValueType, uint16_t, CodecInt16Missing< ByteOrder, ValueType > >, odc::codec::BaseCodecMissing< ByteOrder, ValueType, uint8_t, CodecConstantOrMissing< ByteOrder, ValueType > >, odc::codec::CodecIntegerDirect< ByteOrder, ValueType, InternalValueType, DerivedCodec >, odc::codec::CodecIntegerDirect< ByteOrder, ValueType, int32_t, CodecInt32< ByteOrder, ValueType > >, odc::codec::CodecIntegerOffset< ByteOrder, ValueType, InternalValueType, DerivedCodec >, odc::codec::CodecIntegerOffset< ByteOrder, ValueType, uint8_t, CodecInt8< ByteOrder, ValueType > >, odc::codec::CodecIntegerOffset< ByteOrder, ValueType, uint16_t, CodecInt16< ByteOrder, ValueType > >, odc::codec::CodecConstantString< ByteOrder >, odc::codec::CodecConstant< ByteOrder, ValueType >, and odc::codec::CodecConstant< ByteOrder, double >.
|
inline |
|
pure virtual |
Implemented in odc::codec::IntStringCodecBase< ByteOrder, InternalCodec >, odc::codec::IntStringCodecBase< ByteOrder, CodecInt8< ByteOrder, int64_t > >, odc::codec::IntStringCodecBase< ByteOrder, CodecInt16< ByteOrder, int64_t > >, odc::codec::CodecChars< ByteOrder >, odc::codec::ShortRealBase< ByteOrder, InternalMissing >, odc::codec::ShortRealBase< ByteOrder, real2MissingAsInt >, odc::codec::ShortRealBase< ByteOrder, minFloatAsInt >, odc::codec::CodecLongReal< ByteOrder >, odc::codec::BaseCodecMissing< ByteOrder, ValueType, InternalValueType, DerivedCodec >, odc::codec::BaseCodecMissing< ByteOrder, ValueType, uint8_t, CodecInt8Missing< ByteOrder, ValueType > >, odc::codec::BaseCodecMissing< ByteOrder, ValueType, uint16_t, CodecInt16Missing< ByteOrder, ValueType > >, odc::codec::BaseCodecMissing< ByteOrder, ValueType, uint8_t, CodecConstantOrMissing< ByteOrder, ValueType > >, odc::codec::CodecIntegerDirect< ByteOrder, ValueType, InternalValueType, DerivedCodec >, odc::codec::CodecIntegerDirect< ByteOrder, ValueType, int32_t, CodecInt32< ByteOrder, ValueType > >, odc::codec::CodecIntegerOffset< ByteOrder, ValueType, InternalValueType, DerivedCodec >, odc::codec::CodecIntegerOffset< ByteOrder, ValueType, uint8_t, CodecInt8< ByteOrder, ValueType > >, odc::codec::CodecIntegerOffset< ByteOrder, ValueType, uint16_t, CodecInt16< ByteOrder, ValueType > >, odc::codec::CodecConstantString< ByteOrder >, odc::codec::CodecConstant< ByteOrder, ValueType >, and odc::codec::CodecConstant< ByteOrder, double >.
|
virtual |
Reimplemented in odc::codec::CodecChars< ByteOrder >, odc::codec::CodecLongReal< ByteOrder >, odc::codec::BaseCodecInteger< ByteOrder, ValueType >, odc::codec::CodecConstant< ByteOrder, ValueType >, and odc::codec::CodecConstant< ByteOrder, double >.
Definition at line 98 of file Codec.cc.
|
inline |
|
virtual |
|
virtual |
void odc::core::Codec::load | ( | GeneralDataStream & | ds | ) |
|
inline |
|
inline |
|
inline |
|
inline |
void odc::core::Codec::missingValue | ( | double | v | ) |
|
inline |
|
inlinevirtual |
Reimplemented in odc::codec::CodecChars< ByteOrder >, and odc::codec::CodecConstantString< ByteOrder >.
Definition at line 76 of file Codec.h.
|
privatevirtual |
Reimplemented in odc::codec::CodecChars< ByteOrder >, odc::codec::CodecConstantString< ByteOrder >, odc::codec::CodecConstant< ByteOrder, ValueType >, odc::codec::CodecConstant< ByteOrder, double >, odc::codec::CodecConstantOrMissing< ByteOrder, ValueType >, and odc::codec::CodecConstantOrMissing< ByteOrder, double >.
|
virtual |
|
virtual |
void odc::core::Codec::save | ( | GeneralDataStream & | ds | ) |
|
virtual |
|
virtual |
void odc::core::Codec::setDataStream | ( | GeneralDataStream & | ds | ) |
|
pure virtual |
Implemented in odc::codec::IntStringCodecBase< ByteOrder, InternalCodec >, odc::codec::IntStringCodecBase< ByteOrder, CodecInt8< ByteOrder, int64_t > >, odc::codec::IntStringCodecBase< ByteOrder, CodecInt16< ByteOrder, int64_t > >, odc::codec::CodecChars< ByteOrder >, odc::codec::ShortRealBase< ByteOrder, InternalMissing >, odc::codec::ShortRealBase< ByteOrder, real2MissingAsInt >, odc::codec::ShortRealBase< ByteOrder, minFloatAsInt >, odc::codec::CodecLongReal< ByteOrder >, odc::codec::BaseCodecMissing< ByteOrder, ValueType, InternalValueType, DerivedCodec >, odc::codec::BaseCodecMissing< ByteOrder, ValueType, uint8_t, CodecInt8Missing< ByteOrder, ValueType > >, odc::codec::BaseCodecMissing< ByteOrder, ValueType, uint16_t, CodecInt16Missing< ByteOrder, ValueType > >, odc::codec::BaseCodecMissing< ByteOrder, ValueType, uint8_t, CodecConstantOrMissing< ByteOrder, ValueType > >, odc::codec::CodecIntegerDirect< ByteOrder, ValueType, InternalValueType, DerivedCodec >, odc::codec::CodecIntegerDirect< ByteOrder, ValueType, int32_t, CodecInt32< ByteOrder, ValueType > >, odc::codec::CodecIntegerOffset< ByteOrder, ValueType, InternalValueType, DerivedCodec >, odc::codec::CodecIntegerOffset< ByteOrder, ValueType, uint8_t, CodecInt8< ByteOrder, ValueType > >, odc::codec::CodecIntegerOffset< ByteOrder, ValueType, uint16_t, CodecInt16< ByteOrder, ValueType > >, odc::codec::CodecConstantString< ByteOrder >, odc::codec::CodecConstant< ByteOrder, ValueType >, and odc::codec::CodecConstant< ByteOrder, double >.
|
friend |
|
protected |