CCF
Loading...
Searching...
No Matches
Classes | Typedefs | Functions
ccf::cbor Namespace Reference

Classes

struct  Array
 
struct  Map
 
struct  Tagged
 
struct  ValueImpl
 

Typedefs

using Value = std::unique_ptr< ValueImpl >
 
using Unsigned = uint64_t
 
using Signed = int64_t
 
using Bytes = std::span< const uint8_t >
 
using String = std::string_view
 
using Simple = uint8_t
 
using Type = std::variant< Unsigned, Signed, Bytes, String, Array, Map, Tagged, Simple >
 
using CBORDecodeError = std::runtime_error
 

Functions

Value make_unsigned (uint64_t value)
 
Value make_signed (int64_t value)
 
Value make_string (std::string_view data)
 
Value parse_value (std::span< const uint8_t > raw, std::string_view context)
 
std::string print_value (const Value &value, size_t indent)
 

Typedef Documentation

◆ Bytes

using ccf::cbor::Bytes = typedef std::span<const uint8_t>

◆ CBORDecodeError

using ccf::cbor::CBORDecodeError = typedef std::runtime_error

◆ Signed

using ccf::cbor::Signed = typedef int64_t

◆ Simple

using ccf::cbor::Simple = typedef uint8_t

◆ String

using ccf::cbor::String = typedef std::string_view

◆ Type

using ccf::cbor::Type = typedef std::variant<Unsigned, Signed, Bytes, String, Array, Map, Tagged, Simple>

◆ Unsigned

using ccf::cbor::Unsigned = typedef uint64_t

◆ Value

using ccf::cbor::Value = typedef std::unique_ptr<ValueImpl>

Function Documentation

◆ make_signed()

Value ccf::cbor::make_signed ( int64_t  value)

◆ make_string()

Value ccf::cbor::make_string ( std::string_view  data)

◆ make_unsigned()

Value ccf::cbor::make_unsigned ( uint64_t  value)

◆ parse_value()

Value ccf::cbor::parse_value ( std::span< const uint8_t >  raw,
std::string_view  context 
)

◆ print_value()

std::string ccf::cbor::print_value ( const Value value,
size_t  indent 
)