|
iCub-main
|
The abstract base class for EventListeners that output to a port. More...
#include <IPortEventListener.h>
Inheritance diagram for iCub::learningmachine::IPortEventListener:Public Member Functions | |
| IPortEventListener (std::string pp) | |
| Constructor. | |
| IPortEventListener (const IPortEventListener &other) | |
| Copy Constructor. | |
| virtual | ~IPortEventListener () |
| Destructor. | |
| virtual IPortEventListener & | operator= (const IPortEventListener &other) |
| Assignment operator. | |
| virtual void | start () |
| Starts the IEventListener. | |
| virtual bool | configure (yarp::os::Searchable &config) |
| virtual std::string | getInfo () |
| Asks the event listener to return a string containing information on its configuration so far. | |
Public Member Functions inherited from iCub::learningmachine::IEventListener | |
| IEventListener () | |
| Constructor. | |
| virtual | ~IEventListener () |
| Destructor (empty). | |
| virtual void | handle (IEvent &e) |
| Default handler for any Event, which means the Event is ignored. | |
| virtual void | handle (TrainEvent &e) |
| Handling of a TrainEvent. | |
| virtual void | handle (PredictEvent &e) |
| Handling of a PredictEvent. | |
| virtual IEventListener * | clone ()=0 |
| Asks the event listener to return a new object of its type. | |
| std::string | getName () const |
| Retrieve the name of this IEventListener. | |
| void | setName (std::string name) |
| Set the name of this IEventListener. | |
| virtual bool | isEnabled () |
| Tells whether dispatching of events is enabled. | |
| virtual void | setEnabled (bool val) |
| Enables or disables dispatching of events. | |
Protected Member Functions | |
| void | resetPort (std::string portName) |
| Resets the port and opens it at the specified name. | |
Protected Attributes | |
| yarp::os::Port | port |
| The outgoing port for the events. | |
| bool | verbose |
| Verbosity controls whether events are printed to standard output. | |
| std::string | portPrefix |
| A prefix path for the ports that will be registered. | |
Protected Attributes inherited from iCub::learningmachine::IEventListener | |
| std::string | name |
| The name of this type of EventListener. | |
| bool | enabled |
| Boolean switch to disable or enable event the listener. | |
The abstract base class for EventListeners that output to a port.
This class is introduced so that base functionality to register ports can be inherited by multiple subclasses.
Definition at line 43 of file IPortEventListener.h.
|
inline |
Constructor.
| pp | the standard prefix for opening the ports |
Definition at line 75 of file IPortEventListener.h.
|
inline |
Copy Constructor.
Definition at line 80 of file IPortEventListener.h.
|
inlinevirtual |
Destructor.
Definition at line 86 of file IPortEventListener.h.
|
virtual |
Reimplemented from iCub::learningmachine::IEventListener.
Definition at line 62 of file IPortEventListener.cpp.
|
inlinevirtual |
Asks the event listener to return a string containing information on its configuration so far.
Reimplemented from iCub::learningmachine::IEventListener.
Definition at line 114 of file IPortEventListener.h.
|
virtual |
Assignment operator.
Definition at line 29 of file IPortEventListener.cpp.
|
protected |
Resets the port and opens it at the specified name.
If passed an empty string the port is opened at the first free port with the predefined prefix.
| portName | the name of the port |
Definition at line 37 of file IPortEventListener.cpp.
|
inlinevirtual |
Starts the IEventListener.
Reimplemented from iCub::learningmachine::IEventListener.
Definition at line 99 of file IPortEventListener.h.
|
protected |
The outgoing port for the events.
Definition at line 48 of file IPortEventListener.h.
|
protected |
A prefix path for the ports that will be registered.
Definition at line 58 of file IPortEventListener.h.
|
protected |
Verbosity controls whether events are printed to standard output.
Definition at line 53 of file IPortEventListener.h.