YARP
Yet Another Robot Platform
TypedReaderThread.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_TYPEDREADERTHREAD_H
8 #define YARP_OS_TYPEDREADERTHREAD_H
9 
10 #include <yarp/os/Thread.h>
11 
12 namespace yarp {
13 namespace os {
14 
15 template <typename T>
16 class TypedReader;
17 
18 template <typename T>
19 class TypedReaderCallback;
20 
21 template <typename T>
22 class TypedReaderThread : public Thread
23 {
24 public:
27 
29 
32 
33  void run() override;
34 
35  void onStop() override;
36 };
37 
38 } // namespace os
39 } // namespace yarp
40 
42 
43 #endif // YARP_OS_TYPEDREADERTHREAD_H
An abstraction for a thread of execution.
Definition: Thread.h:22
A callback for typed data from a port.
void onStop() override
Call-back, called while halting the thread (before join).
void run() override
Main body of the new thread.
TypedReaderCallback< T > * callback
A base class for sources of typed data.
Definition: TypedReader.h:23
The main, catch-all namespace for YARP.
Definition: dirs.h:16