Classes | Typedefs | Enumerations | Functions | Variables
DataTamerParser Namespace Reference

Classes

struct  BufferSpan
 
struct  Schema
 DataTamer uses a simple "flat" schema of key/value pairs (each pair is a "field"). More...
 
struct  SnapshotView
 
struct  TypeField
 

Typedefs

using FieldsVector = std::vector< TypeField >
 
using VarNumber = std::variant< bool, char, int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t, float, double >
 

Enumerations

enum  BasicType {
  BasicType::BOOL, BasicType::CHAR, BasicType::INT8, BasicType::UINT8,
  BasicType::INT16, BasicType::UINT16, BasicType::INT32, BasicType::UINT32,
  BasicType::INT64, BasicType::UINT64, BasicType::FLOAT32, BasicType::FLOAT64,
  BasicType::OTHER
}
 

Functions

uint64_t AddFieldToHash (const TypeField &field, uint64_t hash)
 
Schema BuilSchemaFromText (const std::string &txt)
 
template<typename T >
Deserialize (BufferSpan &buffer)
 
VarNumber DeserializeToVarNumber (BasicType type, BufferSpan &buffer)
 
bool GetBit (BufferSpan mask, size_t index)
 
template<typename NumberCallback , typename CustomCallback = decltype(NullCustomCallback)>
bool ParseSnapshot (const Schema &schema, SnapshotView snapshot, const NumberCallback &callback_number, const CustomCallback &callback_custom=NullCustomCallback)
 
template<typename NumberCallback >
bool ParseSnapshotRecursive (const TypeField &field, const std::map< std::string, FieldsVector > &types_list, BufferSpan &buffer, const NumberCallback &callback_number, const std::string &prefix)
 

Variables

constexpr auto NullCustomCallback
 
constexpr int SCHEMA_VERSION = 4
 
constexpr size_t TypesCount = 13
 

Typedef Documentation

◆ FieldsVector

using DataTamerParser::FieldsVector = typedef std::vector<TypeField>

Definition at line 72 of file data_tamer_parser.hpp.

◆ VarNumber

using DataTamerParser::VarNumber = typedef std::variant<bool, char, int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t, uint64_t, float, double>

Definition at line 43 of file data_tamer_parser.hpp.

Enumeration Type Documentation

◆ BasicType

Enumerator
BOOL 
CHAR 
INT8 
UINT8 
INT16 
UINT16 
INT32 
UINT32 
INT64 
UINT64 
FLOAT32 
FLOAT64 
OTHER 

Definition at line 19 of file data_tamer_parser.hpp.

Function Documentation

◆ AddFieldToHash()

uint64_t DataTamerParser::AddFieldToHash ( const TypeField field,
uint64_t  hash 
)
inline

Definition at line 186 of file data_tamer_parser.hpp.

◆ BuilSchemaFromText()

Schema DataTamerParser::BuilSchemaFromText ( const std::string &  txt)
inline

Definition at line 216 of file data_tamer_parser.hpp.

◆ Deserialize()

template<typename T >
T DataTamerParser::Deserialize ( BufferSpan buffer)
inline

Definition at line 126 of file data_tamer_parser.hpp.

◆ DeserializeToVarNumber()

VarNumber DataTamerParser::DeserializeToVarNumber ( BasicType  type,
BufferSpan buffer 
)
inline

Definition at line 140 of file data_tamer_parser.hpp.

◆ GetBit()

bool DataTamerParser::GetBit ( BufferSpan  mask,
size_t  index 
)
inline

Definition at line 180 of file data_tamer_parser.hpp.

◆ ParseSnapshot()

template<typename NumberCallback , typename CustomCallback = decltype(NullCustomCallback)>
bool DataTamerParser::ParseSnapshot ( const Schema schema,
SnapshotView  snapshot,
const NumberCallback &  callback_number,
const CustomCallback &  callback_custom = NullCustomCallback 
)
inline

Definition at line 411 of file data_tamer_parser.hpp.

◆ ParseSnapshotRecursive()

template<typename NumberCallback >
bool DataTamerParser::ParseSnapshotRecursive ( const TypeField field,
const std::map< std::string, FieldsVector > &  types_list,
BufferSpan buffer,
const NumberCallback &  callback_number,
const std::string &  prefix 
)

Definition at line 362 of file data_tamer_parser.hpp.

Variable Documentation

◆ NullCustomCallback

constexpr auto DataTamerParser::NullCustomCallback
constexpr
Initial value:
= [](const std::string&, const BufferSpan,
const std::string&) {}

Definition at line 107 of file data_tamer_parser.hpp.

◆ SCHEMA_VERSION

constexpr int DataTamerParser::SCHEMA_VERSION = 4
constexpr

Definition at line 17 of file data_tamer_parser.hpp.

◆ TypesCount

constexpr size_t DataTamerParser::TypesCount = 13
constexpr

Definition at line 40 of file data_tamer_parser.hpp.



plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:51