1 /***************************************************************************
2 * Copyright (C) 2006 by Gerd v. Egidy *
5 * This library is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU Lesser General Public License version *
7 * 2.1 as published by the Free Software Foundation. *
9 * This library is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU Lesser General Public License for more details. *
14 * You should have received a copy of the GNU Lesser General Public *
15 * License along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
18 ***************************************************************************/
20 #include <boost/archive/binary_oarchive.hpp>
21 #include <boost/archive/binary_iarchive.hpp>
22 #include <boost/archive/xml_oarchive.hpp>
23 #include <boost/archive/xml_iarchive.hpp>
25 #include "t2n_exception.hxx"
27 #include <boost/serialization/export.hpp>
29 BOOST_CLASS_EXPORT(libt2n::t2n_exception)
30 BOOST_CLASS_EXPORT(libt2n::t2n_communication_error)
31 BOOST_CLASS_EXPORT(libt2n::t2n_connect_error)
32 BOOST_CLASS_EXPORT(libt2n::t2n_server_error)
33 BOOST_CLASS_EXPORT(libt2n::t2n_transfer_error)
34 BOOST_CLASS_EXPORT(libt2n::t2n_version_mismatch)
35 BOOST_CLASS_EXPORT(libt2n::t2n_command_error)
36 BOOST_CLASS_EXPORT(libt2n::t2n_parameter_error)
37 BOOST_CLASS_EXPORT(libt2n::t2n_serialization_error)
38 BOOST_CLASS_EXPORT(libt2n::t2n_runtime_error)
43 template<class Archive>
44 void t2n_exception::serialize(Archive & ar, const unsigned int version)
46 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(exception);
47 ar & BOOST_SERIALIZATION_NVP(message);
50 template<class Archive>
51 void t2n_communication_error::serialize(Archive & ar, const unsigned int version)
53 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(t2n_exception);
56 template<class Archive>
57 void t2n_connect_error::serialize(Archive & ar, const unsigned int version)
59 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(t2n_communication_error);
62 template<class Archive>
63 void t2n_server_error::serialize(Archive & ar, const unsigned int version)
65 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(t2n_communication_error);
68 template<class Archive>
69 void t2n_transfer_error::serialize(Archive & ar, const unsigned int version)
71 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(t2n_communication_error);
74 template<class Archive>
75 void t2n_version_mismatch::serialize(Archive & ar, const unsigned int version)
77 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(t2n_communication_error);
80 template<class Archive>
81 void t2n_command_error::serialize(Archive & ar, const unsigned int version)
83 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(t2n_exception);
86 template<class Archive>
87 void t2n_parameter_error::serialize(Archive & ar, const unsigned int version)
89 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(t2n_exception);
92 template<class Archive>
93 void t2n_serialization_error::serialize(Archive & ar, const unsigned int version)
95 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(t2n_exception);
98 template<class Archive>
99 void t2n_runtime_error::serialize(Archive & ar, const unsigned int version)
101 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(t2n_exception);
104 } // namespace libt2n