40 #include <boost/variant/variant.hpp> 41 #include <boost/variant/apply_visitor.hpp> 42 #include <boost/variant/static_visitor.hpp> 43 #include <boost/mpl/empty.hpp> 44 #include <boost/mpl/if.hpp> 45 #include <boost/mpl/front.hpp> 46 #include <boost/mpl/pop_front.hpp> 55 template <
class Archive,
class T>
64 template <
class Archive,
class Variant,
class TBegin,
class TEnd>
78 ar.stream().setstate(std::ios::failbit);
92 template <
class Archive,
class Variant,
class TBegin>
99 ar.stream().setstate(std::ios::failbit);
105 template <
template <
bool>
class Archive, BOOST_VARIANT_ENUM_PARAMS(
typename T)>
110 typedef typename variant_type::types
types;
115 ar.read_variant_tag(t);
120 ar.stream().setstate(std::ios::failbit);
128 template <
template <
bool>
class Archive, BOOST_VARIANT_ENUM_PARAMS(
typename T)>
134 struct visitor :
public boost::static_visitor<bool>
141 bool operator ()(
T &rv)
const 147 ar.stream().setstate(std::ios::failbit);
156 return boost::apply_visitor(visitor(ar), v);
Archive::variant_tag_type variant_tag_type
Definition: variant.h:67
const uint32_t T[512]
Definition: groestl_tables.h:34
boost::variant< BOOST_VARIANT_ENUM_PARAMS(T)> variant_type
Definition: variant.h:108
Archive::variant_tag_type variant_tag_type
Definition: variant.h:95
Definition: unordered_containers_boost_serialization.h:38
boost::variant< BOOST_VARIANT_ENUM_PARAMS(T)> variant_type
Definition: variant.h:131
reads a variant
Definition: variant.h:65
static bool serialize(Archive< false > &ar, variant_type &v)
Definition: variant.h:112
Archive< false >::variant_tag_type variant_tag_type
Definition: variant.h:109
static bool read(Archive &ar, Variant &v, variant_tag_type t)
Definition: variant.h:72
Simple DSL AAPI based on.
static bool serialize(Archive< true > &ar, variant_type &v)
Definition: variant.h:155
Archive< true > & ar
Definition: variant.h:136
type
Definition: json.h:74
#define false
Definition: stdbool.h:38
string read(string filename)
Definition: tools.cpp:831
boost::mpl::deref< TBegin >::type current_type
Definition: variant.h:69
static bool read(Archive &ar, Variant &v, variant_tag_type t)
Definition: variant.h:97
... wouldn't a class be better?
Definition: serialization.h:90
string a
Definition: MakeCryptoOps.py:15
visitor(Archive< true > &a)
Definition: variant.h:138
bool do_serialize(Archive< false > &ar, std::vector< crypto::signature > &v)
Definition: crypto.h:44
variant_type::types types
Definition: variant.h:110
boost::mpl::next< TBegin >::type TNext
Definition: variant.h:68
#define true
Definition: stdbool.h:37