The SWC-DB Range-Data C++ namespace 'SWC::Ranger::RangeData'. More...
Functions | |
void | write (DynamicBuffer &dst_buf, CellStore::Readers &cellstores) |
void | save (int &err, CellStore::Readers &cellstores) |
void | read (int &err, const uint8_t **ptr, size_t *remain, CellStore::Readers &cellstores) |
void | load (int &err, CellStore::Readers &cellstores) |
Variables | |
const uint8_t | HEADER_SIZE = 13 |
const uint8_t | HEADER_OFFSET_CHKSUM = 9 |
const uint8_t | VERSION = 1 |
The SWC-DB Range-Data C++ namespace 'SWC::Ranger::RangeData'.
SWC_CAN_INLINE void SWC::Ranger::RangeData::load | ( | int & | err, |
CellStore::Readers & | cellstores | ||
) |
Definition at line 72 of file RangeData.cc.
References SWC::Core::Buffer< T >::base, SWC::Core::checksum_i32_chk(), SWC::Error::CHECKSUM_MISMATCH, SWC::Error::Exception::code(), SWC::Serialization::decode_i32(), SWC::Serialization::decode_i8(), SWC::Core::Vector< T, SizeT, GROW_SZ >::empty(), SWC::Common::Files::RgrData::HEADER_OFFSET_CHKSUM, SWC::Common::Files::RgrData::HEADER_SIZE, SWC::Env::FsInterface::interface(), SWC::Ranger::CellStore::Readers::load_from_path(), SWC::LOG_ERROR, SWC::Error::OK, SWC::Ranger::CellStore::Readers::range, SWC::Common::Files::RgrData::read(), SWC::Common::Files::Schema::save(), SWC::Core::Buffer< T >::size, SWC_CURRENT_EXCEPTION, SWC_LOG_OSTREAM, and SWC_LOG_OUT.
Referenced by SWC::Ranger::Range::load().
void SWC::Ranger::RangeData::read | ( | int & | err, |
const uint8_t ** | ptr, | ||
size_t * | remain, | ||
CellStore::Readers & | cellstores | ||
) |
Definition at line 59 of file RangeData.cc.
References SWC::Ranger::CellStore::Readers::clear(), SWC::Ranger::CellStore::Readers::decode(), SWC::LOG_WARN, SWC_FMT_LU, and SWC_LOGF.
void SWC::Ranger::RangeData::save | ( | int & | err, |
CellStore::Readers & | cellstores | ||
) |
Definition at line 40 of file RangeData.cc.
References SWC::Env::FsInterface::interface(), SWC::FS::SmartFd::make_ptr(), SWC::FS::OPEN_FLAG_OVERWRITE, SWC::Ranger::CellStore::Readers::range, and SWC::Common::Files::Schema::write().
Referenced by SWC::Ranger::Blocks::apply_new(), SWC::Ranger::Range::internal_create(), and SWC::Ranger::Range::load().
void SWC::Ranger::RangeData::write | ( | DynamicBuffer & | dst_buf, |
CellStore::Readers & | cellstores | ||
) |
Definition at line 20 of file RangeData.cc.
References SWC::Core::checksum_i32(), SWC::Ranger::CellStore::Readers::encode(), SWC::Serialization::encode_i32(), SWC::Serialization::encode_i8(), SWC::Ranger::CellStore::Readers::encoded_length(), SWC::Core::BufferDyn< BufferT >::ensure(), SWC::Common::Files::RgrData::HEADER_SIZE, SWC::Core::BufferDyn< BufferT >::ptr, and SWC::Common::Files::Schema::VERSION.
const uint8_t SWC::Ranger::RangeData::HEADER_OFFSET_CHKSUM = 9 |
Definition at line 21 of file RangeData.h.
const uint8_t SWC::Ranger::RangeData::HEADER_SIZE = 13 |
Definition at line 20 of file RangeData.h.
const uint8_t SWC::Ranger::RangeData::VERSION = 1 |
Definition at line 22 of file RangeData.h.