Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
database_utils.hpp File Reference
#include <sysio/chain/types.hpp>
#include <fc/io/raw.hpp>
#include <softfloat.hpp>
Include dependency graph for database_utils.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  sysio::chain::index_utils< Index >
 
class  sysio::chain::index_set< Index >
 
class  sysio::chain::index_set< FirstIndex, RemainingIndices... >
 

Namespaces

namespace  sysio
 
namespace  sysio::chain
 
namespace  fc
 namespace sysio::chain
 
namespace  chainbase
 

Functions

template<typename DataStream >
DataStream & sysio::chain::operator<< (DataStream &ds, const shared_blob &b)
 
template<typename DataStream >
DataStream & sysio::chain::operator>> (DataStream &ds, shared_blob &b)
 
template<typename OidType >
void fc::to_variant (const chainbase::oid< OidType > &oid, variant &v)
 
template<typename OidType >
void fc::from_variant (const variant &v, chainbase::oid< OidType > &oid)
 
void fc::float64_to_double (const float64_t &f, double &d)
 
void fc::double_to_float64 (const double &d, float64_t &f)
 
void fc::float128_to_uint128 (const float128_t &f, sysio::chain::uint128_t &u)
 
void fc::uint128_to_float128 (const sysio::chain::uint128_t &u, float128_t &f)
 
void fc::to_variant (const float64_t &f, variant &v)
 
void fc::from_variant (const variant &v, float64_t &f)
 
void fc::to_variant (const float128_t &f, variant &v)
 
void fc::from_variant (const variant &v, float128_t &f)
 
void fc::to_variant (const sysio::chain::shared_string &s, variant &v)
 
void fc::from_variant (const variant &v, sysio::chain::shared_string &s)
 
void fc::to_variant (const sysio::chain::shared_blob &b, variant &v)
 
void fc::from_variant (const variant &v, sysio::chain::shared_blob &b)
 
void fc::to_variant (const blob &b, variant &v)
 
void fc::from_variant (const variant &v, blob &b)
 
template<typename T >
void fc::to_variant (const sysio::chain::shared_vector< T > &sv, variant &v)
 
template<typename T >
void fc::from_variant (const variant &v, sysio::chain::shared_vector< T > &sv)
 
template<typename DataStream , typename OidType >
DataStream & chainbase::operator<< (DataStream &ds, const oid< OidType > &oid)
 
template<typename DataStream , typename OidType >
DataStream & chainbase::operator>> (DataStream &ds, oid< OidType > &oid)
 
template<typename DataStream >
DataStream & operator<< (DataStream &ds, const float64_t &v)
 
template<typename DataStream >
DataStream & operator>> (DataStream &ds, float64_t &v)
 
template<typename DataStream >
DataStream & operator<< (DataStream &ds, const float128_t &v)
 
template<typename DataStream >
DataStream & operator>> (DataStream &ds, float128_t &v)
 

Function Documentation

◆ operator<<() [1/2]

template<typename DataStream >
DataStream & operator<< ( DataStream & ds,
const float128_t & v )

Definition at line 246 of file database_utils.hpp.

246 {
247 sysio::chain::uint128_t uint128_v;
248 fc::float128_to_uint128(v, uint128_v);
249 fc::raw::pack(ds, uint128_v);
250 return ds;
251}
static const Segment ds(Segment::ds)
void pack(Stream &s, const std::deque< T > &value)
Definition raw.hpp:531
void float128_to_uint128(const float128_t &f, sysio::chain::uint128_t &u)
unsigned __int128 uint128_t
Definition types.hpp:242
Here is the call graph for this function:

◆ operator<<() [2/2]

template<typename DataStream >
DataStream & operator<< ( DataStream & ds,
const float64_t & v )

Definition at line 230 of file database_utils.hpp.

230 {
231 double double_v;
232 fc::float64_to_double(v, double_v);
233 fc::raw::pack(ds, double_v);
234 return ds;
235}
void float64_to_double(const float64_t &f, double &d)
Here is the call graph for this function:

◆ operator>>() [1/2]

template<typename DataStream >
DataStream & operator>> ( DataStream & ds,
float128_t & v )

Definition at line 254 of file database_utils.hpp.

254 {
255 sysio::chain::uint128_t uint128_v;
256 fc::raw::unpack(ds, uint128_v);
257 fc::uint128_to_float128(uint128_v, v);
258 return ds;
259}
void unpack(Stream &s, std::deque< T > &value)
Definition raw.hpp:540
void uint128_to_float128(const sysio::chain::uint128_t &u, float128_t &f)
Here is the call graph for this function:

◆ operator>>() [2/2]

template<typename DataStream >
DataStream & operator>> ( DataStream & ds,
float64_t & v )

Definition at line 238 of file database_utils.hpp.

238 {
239 double double_v;
240 fc::raw::unpack(ds, double_v);
241 fc::double_to_float64(double_v, v);
242 return ds;
243}
void double_to_float64(const double &d, float64_t &f)
Here is the call graph for this function: