aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-09-25 22:27:43 +0200
committerRiccardo Spagni <ric@spagni.net>2017-09-25 22:27:44 +0200
commit29d601563fff1a23fa5c21de8c455d542b1adfe3 (patch)
tree4a071ec0ef979f020a2cf567973e02087494e8b9 /contrib/epee
parentMerge pull request #2466 (diff)
parentwallet2: do not keep block hashes below last checkpoint (diff)
downloadmonero-29d601563fff1a23fa5c21de8c455d542b1adfe3.tar.xz
Merge pull request #2434
36c3465b wallet2: do not keep block hashes below last checkpoint (moneromooo-monero) cdbbe99c checkpoints: add a token checkpoint on testnet (the genesis block) (moneromooo-monero) 493fad80 serialization: add deque serialization (moneromooo-monero) fa54b205 fix typo in basic and core CMakeLists.txt (moneromooo-monero) 5d65a75b move checkpoints in a separate library (moneromooo-monero)
Diffstat (limited to '')
-rw-r--r--contrib/epee/include/serialization/keyvalue_serialization_overloads.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/contrib/epee/include/serialization/keyvalue_serialization_overloads.h b/contrib/epee/include/serialization/keyvalue_serialization_overloads.h
index 1a58cab99..4423f2608 100644
--- a/contrib/epee/include/serialization/keyvalue_serialization_overloads.h
+++ b/contrib/epee/include/serialization/keyvalue_serialization_overloads.h
@@ -227,6 +227,18 @@ namespace epee
}
//-------------------------------------------------------------------------------------------------------------------
template<class t_type, class t_storage>
+ static bool kv_serialize(const std::deque<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
+ {
+ return serialize_stl_container_t_val(d, stg, hparent_section, pname);
+ }
+ //-------------------------------------------------------------------------------------------------------------------
+ template<class t_type, class t_storage>
+ static bool kv_unserialize(std::deque<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
+ {
+ return unserialize_stl_container_t_val(d, stg, hparent_section, pname);
+ }
+ //-------------------------------------------------------------------------------------------------------------------
+ template<class t_type, class t_storage>
static bool kv_serialize(const std::list<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
{
return serialize_stl_container_t_val(d, stg, hparent_section, pname);
@@ -268,6 +280,18 @@ namespace epee
}
//-------------------------------------------------------------------------------------------------------------------
template<class t_type, class t_storage>
+ static bool kv_serialize(const std::deque<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
+ {
+ return serialize_stl_container_t_obj(d, stg, hparent_section, pname);
+ }
+ //-------------------------------------------------------------------------------------------------------------------
+ template<class t_type, class t_storage>
+ static bool kv_unserialize(std::deque<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
+ {
+ return unserialize_stl_container_t_obj(d, stg, hparent_section, pname);
+ }
+ //-------------------------------------------------------------------------------------------------------------------
+ template<class t_type, class t_storage>
static bool kv_serialize(const std::list<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
{
return serialize_stl_container_t_obj(d, stg, hparent_section, pname);
@@ -353,6 +377,18 @@ namespace epee
}
//-------------------------------------------------------------------------------------------------------------------
template<class t_type, class t_storage>
+ bool kv_serialize(const std::deque<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
+ {
+ return kv_serialization_overloads_impl_is_base_serializable_types<boost::mpl::contains<base_serializable_types<t_storage>, typename std::remove_const<t_type>::type>::value>::kv_serialize(d, stg, hparent_section, pname);
+ }
+ //-------------------------------------------------------------------------------------------------------------------
+ template<class t_type, class t_storage>
+ bool kv_unserialize(std::deque<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
+ {
+ return kv_serialization_overloads_impl_is_base_serializable_types<boost::mpl::contains<base_serializable_types<t_storage>, typename std::remove_const<t_type>::type>::value>::kv_unserialize(d, stg, hparent_section, pname);
+ }
+ //-------------------------------------------------------------------------------------------------------------------
+ template<class t_type, class t_storage>
bool kv_serialize(const std::list<t_type>& d, t_storage& stg, typename t_storage::hsection hparent_section, const char* pname)
{
return kv_serialization_overloads_impl_is_base_serializable_types<boost::mpl::contains<base_serializable_types<t_storage>, typename std::remove_const<t_type>::type>::value>::kv_serialize(d, stg, hparent_section, pname);