Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
varint.cpp
Go to the documentation of this file.
1#include <fc/io/varint.hpp>
2#include <fc/variant.hpp>
3
4namespace fc
5{
6void to_variant( const signed_int& var, variant& vo ) { vo = var.value; }
7void from_variant( const variant& var, signed_int& vo ) { vo.value = static_cast<int32_t>(var.as_int64()); }
8void to_variant( const unsigned_int& var, variant& vo ) { vo = var.value; }
9void from_variant( const variant& var, unsigned_int& vo ) { vo.value = static_cast<uint32_t>(var.as_uint64()); }
10}
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
Definition variant.hpp:191
uint64_t as_uint64() const
Definition variant.cpp:398
int64_t as_int64() const
Definition variant.cpp:377
namespace sysio::chain
Definition authority.cpp:3
void from_variant(const fc::variant &v, sysio::chain::chain_id_type &cid)
void to_variant(const sysio::chain::shared_public_key &var, fc::variant &vo)
Definition authority.cpp:4
unsigned int uint32_t
Definition stdint.h:126
signed int int32_t
Definition stdint.h:123
serializes a 32 bit signed interger in as few bytes as possible
Definition varint.hpp:41
int32_t value
Definition varint.hpp:49
uint32_t value
Definition varint.hpp:17