RSB  0.9.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Int64Converter.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of the RSB project
4  *
5  * Copyright (C) 2010 by Johannes Wienke <jwienke at techfak dot uni-bielefeld dot de>
6  * Copyright (C) 2011, 2013 Jan Moringen <jmoringe@techfak.uni-bielefeld.de>
7  *
8  * This file may be licensed under the terms of the
9  * GNU Lesser General Public License Version 3 (the ``LGPL''),
10  * or (at your option) any later version.
11  *
12  * Software distributed under the License is distributed
13  * on an ``AS IS'' basis, WITHOUT WARRANTY OF ANY KIND, either
14  * express or implied. See the LGPL for the specific language
15  * governing rights and limitations.
16  *
17  * You should have received a copy of the LGPL along with this
18  * program. If not, go to http://www.gnu.org/licenses/lgpl.html
19  * or write to the Free Software Foundation, Inc.,
20  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21  *
22  * The development of this software was supported by:
23  * CoR-Lab, Research Institute for Cognition and Robotics
24  * Bielefeld University
25  *
26  * ============================================================ */
27 
28 #pragma once
29 
30 #include <string>
31 
32 #include <boost/shared_ptr.hpp>
33 
34 #include "Converter.h"
35 
36 #include "rsb/rsbexports.h"
37 
38 namespace rsb {
39 namespace converter {
40 
47 class RSB_EXPORT Int64Converter: public Converter<std::string> {
48 public:
50  virtual ~Int64Converter();
51 
52  std::string serialize(const AnnotatedData& data, std::string& wire);
53  AnnotatedData deserialize(const std::string& wireSchema,
54  const std::string& wire);
55 
56 private:
57 
58  static const std::string WIRE_SCHEMA;
59 
60 };
61 
62 typedef boost::shared_ptr<Int64Converter> Int64ConverterPtr;
63 
64 }
65 }
std::pair< std::string, boost::shared_ptr< void > > AnnotatedData
A combination of data type and the actual data.
Definition: Event.h:256
boost::shared_ptr< Int64Converter > Int64ConverterPtr
static const std::string WIRE_SCHEMA
Converter for the int64 type.