RCFProto

- Main Page
- Classes
- Files

- File List

All Classes Functions Typedefs
SerializationProtocol_BS.hpp
1
2 //******************************************************************************
3 // RCF - Remote Call Framework
4 //
5 // Copyright (c) 2005 - 2013, Delta V Software. All rights reserved.
6 // http://www.deltavsoft.com
7 //
8 // RCF is distributed under dual licenses - closed source or GPL.
9 // Consult your particular license for conditions of use.
10 //
11 // If you have not purchased a commercial license, you are using RCF
12 // under GPL terms.
13 //
14 // Version: 2.0
15 // Contact: support <at> deltavsoft.com
16 //
17 //******************************************************************************
18
19 #ifndef INCLUDE_RCF_PROTOCOL_BOOSTSERIALIZATION_HPP
20 #define INCLUDE_RCF_PROTOCOL_BOOSTSERIALIZATION_HPP
21
22 #include <RCF/SerializationProtocol_Base.hpp>
23
24 #ifdef RCF_USE_BOOST_SERIALIZATION
25 #include <boost/archive/binary_iarchive.hpp>
26 #include <boost/archive/binary_oarchive.hpp>
27 #include <boost/archive/text_iarchive.hpp>
28 #include <boost/archive/text_oarchive.hpp>
29 #endif
30
31 #ifdef RCF_USE_BOOST_XML_SERIALIZATION
32 #include <boost/archive/xml_iarchive.hpp>
33 #include <boost/archive/xml_oarchive.hpp>
34 #endif
35
36 #include <boost/serialization/base_object.hpp>
37 #include <boost/serialization/level.hpp>
38 #include <boost/serialization/string.hpp>
39 #include <boost/serialization/utility.hpp>
40
41 namespace RCF {
42
43 #ifdef RCF_USE_BOOST_SERIALIZATION
44
45 template<>
46 class Protocol< boost::mpl::int_<BsBinary> > :
47 public ProtocolImpl_BSer<boost::archive::binary_iarchive, boost::archive::binary_oarchive>
48 {
49 public:
50 static std::string getName()
51 {
52 return "Boost.Serialization binary serialization protocol.";
53 }
54 };
55
56 template<>
57 class Protocol< boost::mpl::int_<BsText> > :
58 public ProtocolImpl_BSer<boost::archive::text_iarchive, boost::archive::text_oarchive>
59 {
60 public:
61 static std::string getName()
62 {
63 return "Boost.Serialization text serialization protocol.";
64 }
65 };
66
67 #endif
68
69 #ifdef RCF_USE_BOOST_XML_SERIALIZATION
70
71 template<>
72 class Protocol< boost::mpl::int_<BsXml> > :
73 public ProtocolImpl_BSer<boost::archive::xml_iarchive, boost::archive::xml_oarchive>
74 {
75 public:
76 static std::string getName()
77 {
78 return "Boost.Serialization xml serialization protocol.";
79 }
80 };
81
82 #endif
83
84 } // namespace RCF
85
86 #endif