iCub-main
PredictEvent.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2007-2010 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_PREDICTEVENT__
20 #define LM_PREDICTEVENT__
21 
22 #include <string>
23 
24 #include <yarp/sig/Vector.h>
25 
29 
30 namespace iCub {
31 namespace learningmachine {
32 
33 
43 class IEventListener;
44 
45 class PredictEvent : public IEvent {
46 protected:
50  yarp::sig::Vector input;
51 
56 
57 public:
64  PredictEvent(const yarp::sig::Vector& input, const Prediction& predicted);
65 
69  virtual ~PredictEvent() { }
70 
71  /*
72  * Inherited from IEvent.
73  */
74  virtual void visit(IEventListener& listener);
75 
76  /*
77  * Inherited from IEvent.
78  */
79  virtual std::string toString();
80 
85  yarp::sig::Vector& getInput() {
86  return this->input;
87  }
88 
94  return this->predicted;
95  }
96 
97 };
98 
99 } // learningmachine
100 } // iCub
101 
102 #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::PredictEvent::input
yarp::sig::Vector input
Vector of inputs.
Definition: PredictEvent.h:50
Prediction.h
iCub::learningmachine::PredictEvent::toString
virtual std::string toString()
Returns a string representation of the Event.
Definition: PredictEvent.cpp:36
iCub::learningmachine::PredictEvent::visit
virtual void visit(IEventListener &listener)
Causes the Event to visit an EventListener.
Definition: PredictEvent.cpp:32
iCub::learningmachine::PredictEvent::getInput
yarp::sig::Vector & getInput()
Accessor for the vector of inputs.
Definition: PredictEvent.h:85
iCub::learningmachine::IEvent
Definition: IEvent.h:36
IEventListener.h
iCub::learningmachine::IEventListener
Definition: IEventListener.h:45
string
string(REPLACE "-rdynamic" "" CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS}") include_directories($
Definition: CMakeLists.txt:9
iCub::learningmachine::Prediction
Definition: Prediction.h:44
iCub::learningmachine::PredictEvent::PredictEvent
PredictEvent(const yarp::sig::Vector &input, const Prediction &predicted)
Constructor.
Definition: PredictEvent.cpp:27
iCub::learningmachine::PredictEvent::~PredictEvent
virtual ~PredictEvent()
Destructor (empty).
Definition: PredictEvent.h:69
IEvent.h
iCub::learningmachine::PredictEvent::getPredicted
Prediction & getPredicted()
Accessor for the prediction.
Definition: PredictEvent.h:93
iCub::learningmachine::PredictEvent::predicted
Prediction predicted
Vector of predicted outputs.
Definition: PredictEvent.h:55
iCub::learningmachine::PredictEvent
Definition: PredictEvent.h:45