YPC  0.2.0
Classes | Typedefs | Functions
byte.h File Reference
#include "ypc/common/byte.h"
#include <boost/endian/conversion.hpp>
#include <boost/property_tree/ptree.hpp>
#include <ff/network.h>
#include <glog/logging.h>
#include <iostream>
#include <utility>
Include dependency graph for byte.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  boost::property_tree::serialization_translator< String, T >
 
struct  boost::property_tree::serialization_translator< String, ::ypc::utc::bytes< ByteType, Format > >
 
struct  boost::property_tree::translator_between< string_type, ::ypc::utc::bytes< ByteType, Format > >
 
struct  boost::property_tree::translator_between< string_type, string_type >
 

Typedefs

using ypc::byte_t = uint8_t
 
using ypc::bytes = ::ypc::utc::bytes< byte_t, ::ypc::utc::byte_encode::raw_bytes >
 
using ypc::hex_bytes = bytes::hex_bytes_t
 
using ypc::base58_bytes = bytes::base58_bytes_t
 
using ypc::base64_bytes = bytes::base64_bytes_t
 
using boost::property_tree::string_type = std::string
 

Functions

template<typename T >
auto ypc::byte_to_number (byte_t *bytes, size_t len) -> typename std::enable_if< std::is_arithmetic< T >::value, T >::type
 
template<typename T >
auto ypc::number_to_byte (T val, byte_t *bytes, size_t len) -> typename std::enable_if< std::is_arithmetic< T >::value, void >::type
 
template<typename T , typename BytesType >
auto ypc::byte_to_number (const BytesType &v) -> typename std::enable_if< std::is_arithmetic< T >::value, T >::type
 
template<typename BytesType , typename T >
auto ypc::number_to_byte (T val) -> typename std::enable_if< std::is_arithmetic< T >::value &&utc::is_bytes< BytesType >::value, BytesType >::type
 
template<typename ByteType , ::ypc::utc::byte_encode Format>
auto operator<< (std::ostream &out, const ::ypc::utc::bytes< ByteType, Format > &data) -> typename std::enable_if< Format==::ypc::utc::byte_encode::raw_bytes, std::ostream & >::type
 
template<typename ByteType , ::ypc::utc::byte_encode Format>
auto operator>> (std::istream &is, ::ypc::utc::bytes< ByteType, Format > &obj) -> typename std::enable_if< Format==::ypc::utc::byte_encode::raw_bytes, std::istream & >::type
 

Detailed Description

business scenarios

Author
YeeZTech
Date
2022-12-05
Version
2.0