9 #ifndef XML_PACK_EPILOGUE_H
10 #define XML_PACK_EPILOGUE_H
11 #include <typeName_epilogue.h>
12 #include "polyAccessXMLPack.h"
20 namespace classdesc_access
22 #ifdef XML_PACK_BASE_H
23 template <
class T>
struct access_xml_pack
31 #ifdef XML_UNPACK_BASE_H
33 template <
class T>
struct access_xml_unpack
39 template <
class T>
struct access_xml_unpack<const T>
57 Or< is_sequence<T>, is_associative_container<T> >,
68 #ifdef XML_PACK_BASE_H
69 template <
class T>
typename
70 enable_if<AllOtherXMLPackpTypes<T>,
void >::T
71 xml_packp(xml_pack_t& t,
const string& d, T& a, dummy<0> dum=0)
73 xml_pack_t::Tag tag(t,d);
78 #ifdef XML_UNPACK_BASE_H
79 template <
class T>
typename
80 enable_if<AllOtherXMLPackpTypes<T>,
void >::T
81 xml_unpackp(xml_unpack_t& t,
const string& d,T& a, dummy<0> dum=0)
86 template <
class T>
typename
87 enable_if<is_enum<T>,
void >::T
88 xml_unpackp(xml_unpack_t& t,
const string& d,T& a, dummy<1> dum=0)
95 void xml_unpackp(xml_unpack_t& t,
const string& d,
const T& a)
100 #ifdef XML_PACK_BASE_H
103 classdesc::xml_packp(t,d,a);
108 classdesc::xml_packp(t,d,const_cast<T&>(a));
112 {xml_pack(t,
"root",const_cast<T&>(a));
return t;}
116 #ifdef XML_UNPACK_BASE_H
119 classdesc::xml_unpackp(t,d,a);
123 {xml_unpack(t,
"root",a);
return t;}
126 namespace classdesc_access
128 namespace cd=classdesc;
131 #ifdef XML_PACK_BASE_H
132 template <
class T>
struct access_xml_pack<cd::PolyBase<T> >:
134 template <
class T,
class B>
struct access_xml_pack<cd::Poly<T,B> >
143 #ifdef XML_UNPACK_BASE_H
144 template <
class T>
struct access_xml_unpack<cd::PolyBase<T> >:
146 template <
class T,
class B>
struct access_xml_unpack<cd::Poly<T,B> >
157 #ifdef POLYPACKBASE_H
158 #ifdef XML_PACK_BASE_H
159 template <>
struct access_xml_pack<cd::PolyPackBase>:
161 template <
class T>
struct access_xml_pack<cd::PolyPack<T> >:
164 #ifdef XML_UNPACK_BASE_H
165 template <>
struct access_xml_unpack<cd::PolyPackBase>:
167 template <
class T>
struct access_xml_unpack<cd::PolyPack<T> >:
172 #ifdef POLYJSONBASE_H
173 #ifdef XML_PACK_BASE_H
174 template <>
struct access_xml_pack<cd::PolyJsonBase>:
176 template <
class T>
struct access_xml_pack<cd::PolyJson<T> >:
179 #ifdef XML_UNPACK_BASE_H
180 template <>
struct access_xml_unpack<cd::PolyJsonBase>:
182 template <
class T>
struct access_xml_unpack<cd::PolyJson<T> >:
188 #ifdef XML_PACK_BASE_H
189 template <>
struct access_xml_pack<cd::PolyXMLBase>:
191 template <
class T>
struct access_xml_pack<cd::PolyXML<T> >:
194 #ifdef XML_UNPACK_BASE_H
195 template <>
struct access_xml_unpack<cd::PolyXMLBase>:
197 template <
class T>
struct access_xml_unpack<cd::PolyXML<T> >:
203 #ifdef XML_PACK_BASE_H
204 template <
class T>
struct access_xml_pack<cd::ref<T> >
208 if (a) xml_pack(x,d,*a);
213 #ifdef XML_UNPACK_BASE_H
214 template <
class T>
struct access_xml_unpack<cd::ref<T> >
225 #ifdef XML_PACK_BASE_H
227 struct access_xml_pack<T*>
229 void operator()(
cd::xml_pack_t& targ,
const cd::string& desc, T*&)
236 #ifdef XML_UNPACK_BASE_H
238 struct access_xml_unpack<T*>
Definition: classdesc.h:351
Definition: classdesc.h:778
Definition: classdesc_access.h:23
Definition: xml_unpack_base.h:268
helper for constructing null descriptors
Definition: classdesc.h:768
bool exists(const std::string &key)
checks for existence of token unpacked from XML stream
Definition: xml_unpack_base.h:358
Definition: xml_pack_epilogue.h:53
Definition: xml_pack_base.h:49
void unpack(std::string key, T &var)
simple data type deserialisation
Definition: xml_unpack_base.h:328
void pack_notag(const string &d, const T &x)
Definition: xml_pack_base.h:125
base class for exceptions thrown by classdesc
Definition: classdesc.h:391
Definition: classdesc_access.h:24