9 #ifndef JSON_PACK_EPILOGUE_H 10 #define JSON_PACK_EPILOGUE_H 11 #include "classdesc.h" 18 public Not< Or< Or< Or<is_fundamental<T>,is_string<T> >, is_sequence<T> >,
19 is_associative_container<T> > >
22 template <
class T>
typename 31 json_spirit::mValue& parent=
json_find(o,head(d));
32 if (parent.type()!=json_spirit::obj_type)
35 json_spirit::mObject::iterator member=parent.get_obj().find(tail(d));
36 if (member==parent.get_obj().end())
37 parent.get_obj().insert(make_pair(tail(d), json_spirit::mObject()));
48 template <
class T>
typename 56 template <
class T>
void json_unpack(
json_unpack_t& o,
const string& d, T& a)
57 {json_unpackp(o,d,a);}
66 struct access_json_pack
78 struct access_json_unpack
86 std::istringstream i(s);
115 #ifdef POLYPACKBASE_H 118 template <>
struct access_json_unpack<cd::
PolyPackBase>:
120 template <
class T>
struct access_json_pack<cd::
PolyPack<T> >:
122 template <
class T>
struct access_json_unpack<cd::
PolyPack<T> >:
126 #ifdef POLYJSONBASE_H 129 template <>
struct access_json_unpack<cd::
PolyJsonBase>:
131 template <
class T>
struct access_json_pack<cd::
PolyJson<T> >:
133 template <
class T>
struct access_json_unpack<cd::
PolyJson<T> >:
138 template <>
struct access_json_pack<cd::
PolyXMLBase>:
140 template <>
struct access_json_unpack<cd::
PolyXMLBase>:
142 template <
class T>
struct access_json_pack<cd::
PolyXML<T> >:
144 template <
class T>
struct access_json_unpack<cd::
PolyXML<T> >:
150 #include "polyAccessJsonPack.h" Definition: json_pack_base.h:43
Definition: classdesc.h:326
void json_pack(json_pack_t &o, const string &d, T &a)
forward declare generic json operations
Definition: json_pack_epilogue.h:53
Definition: polyJsonBase.h:23
Definition: classdesc_access.h:26
bool throw_on_error
enable exceptions on error conditions
Definition: json_pack_base.h:46
Definition: classdesc_access.h:25
helper for constructing null descriptors
Definition: classdesc.h:784
Definition: json_pack_base.h:20
utility class for defining pack descriptors for polymorphic types
Definition: polyPackBase.h:45
Contains definitions related to classdesc functionality.
Definition: arrays.h:2514
Definition: polyXMLBase.h:25
Definition: polyXMLBase.h:17
controlled template specialisation: stolen from boost::enable_if.
Definition: classdesc.h:249
Definition: json_pack_epilogue.h:17
Definition: classdesc.h:266
interface for applying pack descriptors to polymorphic objects
Definition: polyPackBase.h:18
Contains access_* structs, and nothing else. These structs are used to gain access to private members...
Definition: accessor.h:55
Definition: polyJsonBase.h:15
json_spirit::mValue & json_find(json_spirit::mValue &x, std::string name)
find an object named by name within the json object x
Definition: json_pack_base.h:73