blob.h
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2023 Intel Corporation. All Rights Reserved.
3 
11 #ifndef _FAST_DDS_GENERATED_UDDS_BLOB_H_
12 #define _FAST_DDS_GENERATED_UDDS_BLOB_H_
13 
14 
15 //#include <fastrtps/utils/fixed_size_string.hpp>
16 
17 #include <stdint.h>
18 #include <array>
19 #include <string>
20 #include <vector>
21 #include <map>
22 #include <bitset>
23 
24 #if defined(_WIN32)
25 #if defined(EPROSIMA_USER_DLL_EXPORT)
26 #define eProsima_user_DllExport __declspec( dllexport )
27 #else
28 #define eProsima_user_DllExport
29 #endif // EPROSIMA_USER_DLL_EXPORT
30 #else
31 #define eProsima_user_DllExport
32 #endif // _WIN32
33 
34 #if defined(_WIN32)
35 #if defined(EPROSIMA_USER_DLL_EXPORT)
36 #if defined(blob_SOURCE)
37 #define blob_DllAPI __declspec( dllexport )
38 #else
39 #define blob_DllAPI __declspec( dllimport )
40 #endif // blob_SOURCE
41 #else
42 #define blob_DllAPI
43 #endif // EPROSIMA_USER_DLL_EXPORT
44 #else
45 #define blob_DllAPI
46 #endif // _WIN32
47 
48 namespace eprosima {
49 namespace fastcdr {
50 class Cdr;
51 } // namespace fastcdr
52 } // namespace eprosima
53 
54 
55 namespace udds {
60  class blob
61  {
62  public:
63 
68 
73 
79  const blob& x);
80 
86  blob&& x) noexcept;
87 
93  const blob& x);
94 
100  blob&& x) noexcept;
101 
107  const blob& x) const;
108 
114  const blob& x) const;
115 
121  const std::vector<uint8_t>& _data);
122 
128  std::vector<uint8_t>&& _data);
129 
134  eProsima_user_DllExport const std::vector<uint8_t>& data() const;
135 
140  eProsima_user_DllExport std::vector<uint8_t>& data();
141 
149  size_t current_alignment = 0);
150 
158  const udds::blob& data,
159  size_t current_alignment = 0);
160 
161 
167  eprosima::fastcdr::Cdr& cdr) const;
168 
174  eprosima::fastcdr::Cdr& cdr);
175 
176 
177 
185  size_t current_alignment = 0);
186 
191 
197  eprosima::fastcdr::Cdr& cdr) const;
198 
199  private:
200 
201  std::vector<uint8_t> m_data;
202  };
203 } // namespace udds
204 
205 #endif // _FAST_DDS_GENERATED_UDDS_BLOB_H_
udds::blob::data
const eProsima_user_DllExport std::vector< uint8_t > & data() const
This function returns a constant reference to member data.
Definition: blob.cpp:152
udds::blob::operator==
eProsima_user_DllExport bool operator==(const blob &x) const
Comparison operator.
Definition: blob.cpp:67
data
Definition: parser.hpp:153
udds::blob::getKeyMaxCdrSerializedSize
static eProsima_user_DllExport size_t getKeyMaxCdrSerializedSize(size_t current_alignment=0)
This function returns the maximum serialized size of the Key of an object depending on the buffer ali...
Definition: blob.cpp:166
udds::blob::operator=
eProsima_user_DllExport blob & operator=(const blob &x)
Copy assignment.
Definition: blob.cpp:49
udds::blob::getMaxCdrSerializedSize
static eProsima_user_DllExport size_t getMaxCdrSerializedSize(size_t current_alignment=0)
This function returns the maximum serialized size of an object depending on the buffer alignment.
Definition: blob.cpp:80
eProsima_user_DllExport
#define eProsima_user_DllExport
Definition: blob.h:31
udds::blob::deserialize
eProsima_user_DllExport void deserialize(eprosima::fastcdr::Cdr &cdr)
This function deserializes an object using CDR serialization.
Definition: blob.cpp:122
stdint.h
udds::blob::isKeyDefined
static eProsima_user_DllExport bool isKeyDefined()
This function tells you if the Key has been defined for this type.
Definition: blob.cpp:176
udds::blob::serializeKey
eProsima_user_DllExport void serializeKey(eprosima::fastcdr::Cdr &cdr) const
This function serializes the key members of an object using CDR serialization.
Definition: blob.cpp:181
udds::blob::m_data
std::vector< uint8_t > m_data
Definition: blob.h:201
udds
Definition: blob.h:55
udds::blob::~blob
eProsima_user_DllExport ~blob()
Default destructor.
Definition: blob.cpp:33
x
GLdouble x
Definition: glad/glad/glad.h:2279
udds::blob
This class represents the structure blob defined by the user in the IDL file.
Definition: blob.h:60
udds::blob::operator!=
eProsima_user_DllExport bool operator!=(const blob &x) const
Comparison operator.
Definition: blob.cpp:74
eprosima
Definition: dds-defines.h:9
udds::blob::getCdrSerializedSize
static eProsima_user_DllExport size_t getCdrSerializedSize(const udds::blob &data, size_t current_alignment=0)
This function returns the serialized size of a data depending on the buffer alignment.
Definition: blob.cpp:95
udds::blob::serialize
eProsima_user_DllExport void serialize(eprosima::fastcdr::Cdr &cdr) const
This function serializes an object using CDR serialization.
Definition: blob.cpp:115
udds::blob::blob
eProsima_user_DllExport blob()
Default constructor.
Definition: blob.cpp:26


librealsense2
Author(s): LibRealSense ROS Team
autogenerated on Fri Aug 2 2024 08:30:01