#pragma once #include #include #include #include #include #include #include #include #include #include #include #include #define MAX_ARRAY_ALLOC_SIZE (1024*1024*10) namespace fc { class time_point; class time_point_sec; class variant; class variant_object; class path; template class static_variant; template class enum_type; namespace ip { class endpoint; } namespace ecc { class public_key; class private_key; } template class fixed_string; namespace raw { template inline size_t pack_size( const T& v ); template inline void pack( Stream& s, const fc::fixed_string& u, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void unpack( Stream& s, fc::fixed_string& u, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void pack( Stream& s, const fc::enum_type& tp, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void unpack( Stream& s, fc::enum_type& tp, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void pack( Stream& s, const std::set& value, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void unpack( Stream& s, std::set& value, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void pack( Stream& s, const std::unordered_set& value, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void unpack( Stream& s, std::unordered_set& value, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template void pack( Stream& s, const static_variant& sv, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template void unpack( Stream& s, static_variant& sv, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); //template inline void pack( Stream& s, const flat_set& value, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); //template inline void unpack( Stream& s, flat_set& value, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); //template inline void pack( Stream& s, const std::deque& value, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); //template inline void unpack( Stream& s, std::deque& value, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void pack( Stream& s, const std::unordered_map& value, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void unpack( Stream& s, std::unordered_map& value, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void pack( Stream& s, const std::map& value, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void unpack( Stream& s, std::map& value, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); //template inline void pack( Stream& s, const flat_map& value, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); //template inline void unpack( Stream& s, flat_map& value, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void pack( Stream& s, const std::pair& value, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void unpack( Stream& s, std::pair& value, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void pack( Stream& s, const variant_object& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void unpack( Stream& s, variant_object& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void pack( Stream& s, const variant& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void unpack( Stream& s, variant& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void pack( Stream& s, const path& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void unpack( Stream& s, path& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void pack( Stream& s, const ip::endpoint& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void unpack( Stream& s, ip::endpoint& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template void unpack( Stream& s, fc::optional& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template void unpack( Stream& s, const T& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template void pack( Stream& s, const fc::optional& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template void pack( Stream& s, const safe& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template void unpack( Stream& s, fc::safe& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template void unpack( Stream& s, time_point&, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template void pack( Stream& s, const time_point&, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template void unpack( Stream& s, time_point_sec&, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template void pack( Stream& s, const time_point_sec&, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template void unpack( Stream& s, std::string&, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template void pack( Stream& s, const std::string&, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template void unpack( Stream& s, fc::ecc::public_key&, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template void pack( Stream& s, const fc::ecc::public_key&, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template void unpack( Stream& s, fc::ecc::private_key&, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template void pack( Stream& s, const fc::ecc::private_key&, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void pack( Stream& s, const T& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void unpack( Stream& s, T& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void pack( Stream& s, const std::vector& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void unpack( Stream& s, std::vector& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void pack( Stream& s, const signed_int& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void unpack( Stream& s, signed_int& vi, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void pack( Stream& s, const unsigned_int& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void unpack( Stream& s, unsigned_int& vi, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void pack( Stream& s, const char* v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void pack( Stream& s, const std::vector& value, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void unpack( Stream& s, std::vector& value, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void pack( Stream& s, const fc::array& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void unpack( Stream& s, fc::array& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH); template inline void pack( Stream& s, const bool& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void unpack( Stream& s, bool& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline std::vector pack( const T& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline T unpack( const std::vector& s, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline T unpack( const char* d, uint32_t s, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); template inline void unpack( const char* d, uint32_t s, T& v, uint32_t _max_depth=FC_PACK_MAX_DEPTH ); } }