YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
PortWriterBufferBase.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_PORTWRITERBUFFERBASE_H
8#define YARP_OS_PORTWRITERBUFFERBASE_H
9
10#include <yarp/os/PortWriter.h>
11
12namespace yarp::os {
13
14class Port;
15
16#ifndef DOXYGEN_SHOULD_SKIP_THIS
17
18class PortWriterBufferManager
19{
20public:
21 virtual ~PortWriterBufferManager();
22
23 virtual void onCompletion(void* tracker) = 0;
24};
25
26class PortWriterWrapper : public PortWriter
27{
28public:
29 virtual PortWriter* getInternal() = 0;
30};
31
32#endif // DOXYGEN_SHOULD_SKIP_THIS
33
34
36{
37public:
39
40 virtual ~PortWriterBufferBase();
41
42 virtual PortWriterWrapper *create(PortWriterBufferManager& man, void *tracker) = 0;
43
44 const void* getContent() const;
45
46 bool releaseContent();
47
48 int getCount();
49
50 void attach(Port& port);
51
52 void detach();
53
54 void write(bool strict);
55
56 void waitForWrite();
57
58#ifndef DOXYGEN_SHOULD_SKIP_THIS
59private:
60 class Private;
61 Private* mPriv;
62#endif // DOXYGEN_SHOULD_SKIP_THIS
63};
64
65} // namespace yarp::os
66
67#endif // YARP_OS_PORTWRITERBUFFERBASE_H
A mini-server for performing network communication in the background.
virtual PortWriterWrapper * create(PortWriterBufferManager &man, void *tracker)=0
A mini-server for network communication.
Definition Port.h:46
An interface to the operating system, including Port based communication.
#define YARP_os_API
Definition api.h:18