Open3D (C++ API)  0.18.0+5c982c7
BufferConnection.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - Open3D: www.open3d.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2023 www.open3d.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <memory>
11 #include <sstream>
12 
14 
15 namespace open3d {
16 namespace io {
17 namespace rpc {
18 
21 public:
23 
25  std::shared_ptr<zmq::message_t> Send(zmq::message_t& send_msg);
26 
28  std::shared_ptr<zmq::message_t> Send(const void* data, size_t size);
29 
30  std::stringstream& buffer() { return buffer_; }
31  const std::stringstream& buffer() const { return buffer_; }
32 
33 private:
34  std::stringstream buffer_;
35 };
36 } // namespace rpc
37 } // namespace io
38 } // namespace open3d
Implements a connection writing to a buffer.
Definition: BufferConnection.h:20
std::shared_ptr< zmq::message_t > Send(zmq::message_t &send_msg)
Function for sending data wrapped in a zmq message object.
Definition: BufferConnection.cpp:21
std::stringstream & buffer()
Definition: BufferConnection.h:30
const std::stringstream & buffer() const
Definition: BufferConnection.h:31
BufferConnection()
Definition: BufferConnection.h:22
Base class for all connections.
Definition: ConnectionBase.h:22
int size
Definition: FilePCD.cpp:40
const char const char value recording_handle imu_sample recording_handle uint8_t data
Definition: K4aPlugin.cpp:269
Definition: PinholeCameraIntrinsic.cpp:16