YARP
Yet Another Robot Platform
TypedReaderCallback.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3  * SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #ifndef YARP_OS_TYPEDREADERCALLBACK_H
8 #define YARP_OS_TYPEDREADERCALLBACK_H
9 
10 #include <yarp/os/api.h>
11 
12 namespace yarp {
13 namespace os {
14 
15 template <typename T>
16 class TypedReader;
17 
26 template <typename T>
28 {
29 public:
33  virtual ~TypedReaderCallback();
34 
40  virtual void onRead(T& datum);
41 
52  virtual void onRead(T& datum, const yarp::os::TypedReader<T>& reader);
53 };
54 
55 } // namespace os
56 } // namespace yarp
57 
59 
60 
61 #endif // YARP_OS_TYPEDREADERCALLBACK_H
A callback for typed data from a port.
virtual ~TypedReaderCallback()
Destructor.
virtual void onRead(T &datum)
Callback method.
A base class for sources of typed data.
Definition: TypedReader.h:23
The main, catch-all namespace for YARP.
Definition: dirs.h:16