iCub-main
Serialization.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2011 RobotCub Consortium, European Commission FP6 Project IST-004370
3  * author: Arjan Gijsberts
4  * email: arjan.gijsberts@iit.it
5  * website: www.robotcub.org
6  * Permission is granted to copy, distribute, and/or modify this program
7  * under the terms of the GNU General Public License, version 2 or any
8  * later version published by the Free Software Foundation.
9  *
10  * A copy of the license can be found at
11  * http://www.robotcub.org/icub/license/gpl.txt
12  *
13  * This program is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
16  * Public License for more details
17  */
18 
19 #ifndef LM_SERIALIZATION__
20 #define LM_SERIALIZATION__
21 
22 #include <yarp/sig/Matrix.h>
23 #include <yarp/sig/Vector.h>
24 #include <yarp/os/Bottle.h>
25 
26 namespace iCub {
27 namespace learningmachine {
28 namespace serialization {
29 
46 //void push(const yarp::sig::Vector& v, yarp::os::Bottle& bot);
47 
54 //void push(const yarp::sig::Matrix& M, yarp::os::Bottle& bot);
55 
62 //void pop(const yarp::sig::Vector& v, yarp::os::Bottle& bot);
63 
70 //void pop(const yarp::sig::Matrix& M, yarp::os::Bottle& bot);
71 
79 yarp::os::Bottle& operator<<(yarp::os::Bottle &out, int val);
80 
88 yarp::os::Bottle& operator<<(yarp::os::Bottle &out, double val);
89 
98 yarp::os::Bottle& operator<<(yarp::os::Bottle &out, const yarp::sig::Vector& v);
99 
108 yarp::os::Bottle& operator<<(yarp::os::Bottle &out, const yarp::sig::Matrix& M);
109 
117 yarp::os::Bottle& operator>>(yarp::os::Bottle &in, int& val);
118 
126 yarp::os::Bottle& operator>>(yarp::os::Bottle &in, double& val);
127 
136 yarp::os::Bottle& operator>>(yarp::os::Bottle &in, yarp::sig::Vector& v);
137 
146 yarp::os::Bottle& operator>>(yarp::os::Bottle &in, yarp::sig::Matrix& M);
147 
148 } // serialization
149 } // learningmachine
150 } // iCub
151 
152 #endif
iCub
This file contains the definition of unique IDs for the body parts and the skin parts of the robot.
Definition: emotionInterface.h:17
iCub::learningmachine::serialization::operator<<
yarp::os::Bottle & operator<<(yarp::os::Bottle &out, int val)
Pushes a serialization of a vector to the end of a Bottle.
Definition: Serialization.cpp:25
out
out
Definition: sine.m:8
v
static int v
Definition: iCub_Sim.cpp:42
iCub::learningmachine::serialization::operator>>
yarp::os::Bottle & operator>>(yarp::os::Bottle &in, int &val)
Pops an integer from the end of a Bottle using the extraction operator.
Definition: Serialization.cpp:58