Fast RTPS  Version 2.14.1
Fast RTPS
Loading...
Searching...
No Matches
DynamicDataHelper.hpp
1// Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima).
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef _FASTRTPS_TYPES_DYNAMICDATAHELPER_HPP_
16#define _FASTRTPS_TYPES_DYNAMICDATAHELPER_HPP_
17
18#include <fastrtps/types/AnnotationDescriptor.h>
19#include <fastrtps/types/TypeDescriptor.h>
20#include <fastrtps/types/DynamicType.h>
21#include <fastrtps/types/DynamicData.h>
22#include <fastrtps/types/DynamicDataPtr.h>
23#include <fastrtps/types/DynamicTypeMember.h>
24
25namespace eprosima {
26namespace fastrtps {
27namespace types {
28
30{
31public:
32
33 RTPS_DllAPI static void print(
34 const DynamicData_ptr& data);
35
36 RTPS_DllAPI static std::ostream& print(
37 std::ostream& output,
38 const DynamicData_ptr& data);
39
40 RTPS_DllAPI static void print(
41 const DynamicData* data);
42
43 RTPS_DllAPI static std::ostream& print(
44 std::ostream& output,
45 const DynamicData* data);
46
47protected:
48
50 DynamicData* data,
51 MemberId id,
52 TypeKind kind);
53
55 DynamicData* data,
56 MemberId id,
57 TypeKind kind,
58 std::ostream& output);
59
60 static void print_collection(
61 DynamicData* data,
62 const std::string& tabs = "");
63
64 static void print_collection(
65 DynamicData* data,
66 std::ostream& output,
67 const std::string& tabs = "");
68
70 const std::vector<uint32_t>& bounds,
71 std::vector<std::vector<uint32_t>>& positions);
72
73 static void get_index_position(
74 uint32_t index,
75 const std::vector<uint32_t>& bounds,
76 std::vector<uint32_t>& position);
77
78 static void aux_index_position(
79 uint32_t index,
80 uint32_t inner_index,
81 const std::vector<uint32_t>& bounds,
82 std::vector<uint32_t>& position);
83
85 DynamicData* data);
86
88 DynamicData* data,
89 std::ostream& output);
90
92 DynamicData* data,
93 const std::string& tabs = "");
94
96 DynamicData* data,
97 std::ostream& output,
98 const std::string& tabs = "");
99
101 DynamicData* data,
102 MemberId id,
103 const std::string& tabs = "");
104
106 DynamicData* data,
107 MemberId id,
108 std::ostream& output,
109 const std::string& tabs = "");
110
111 static void print_member(
112 DynamicData* data,
113 const DynamicTypeMember* type,
114 const std::string& tabs = "");
115
116 static void print_member(
117 DynamicData* data,
118 std::ostream& output,
119 const DynamicTypeMember* type,
120 const std::string& tabs = "");
121};
122
123} // namespace types
124} // namespace fastrtps
125} // namespace eprosima
126
127#endif // _FASTRTPS_TYPES_DYNAMICDATAHELPER_HPP_
Definition DynamicDataPtr.h:27
Definition DynamicDataHelper.hpp:30
static void print_complex_collection(DynamicData *data, std::ostream &output, const std::string &tabs="")
static void print_complex_element(DynamicData *data, MemberId id, const std::string &tabs="")
static void print_basic_collection(DynamicData *data, std::ostream &output)
static void print_member(DynamicData *data, const DynamicTypeMember *type, const std::string &tabs="")
static void print_basic_collection(DynamicData *data)
static void print_collection(DynamicData *data, const std::string &tabs="")
static void print_basic_element(DynamicData *data, MemberId id, TypeKind kind, std::ostream &output)
static void aux_index_position(uint32_t index, uint32_t inner_index, const std::vector< uint32_t > &bounds, std::vector< uint32_t > &position)
static void get_index_position(uint32_t index, const std::vector< uint32_t > &bounds, std::vector< uint32_t > &position)
static void print_complex_element(DynamicData *data, MemberId id, std::ostream &output, const std::string &tabs="")
static void print_complex_collection(DynamicData *data, const std::string &tabs="")
static RTPS_DllAPI std::ostream & print(std::ostream &output, const DynamicData *data)
static void print_member(DynamicData *data, std::ostream &output, const DynamicTypeMember *type, const std::string &tabs="")
static RTPS_DllAPI void print(const DynamicData_ptr &data)
static RTPS_DllAPI std::ostream & print(std::ostream &output, const DynamicData_ptr &data)
static void fill_array_positions(const std::vector< uint32_t > &bounds, std::vector< std::vector< uint32_t > > &positions)
static void print_collection(DynamicData *data, std::ostream &output, const std::string &tabs="")
static void print_basic_element(DynamicData *data, MemberId id, TypeKind kind)
static RTPS_DllAPI void print(const DynamicData *data)
Definition DynamicData.h:44
Definition DynamicTypeMember.h:29
uint32_t MemberId
Definition TypesBase.h:285
octet TypeKind
Definition TypesBase.h:120
eProsima namespace.
Definition LibrarySettingsAttributes.h:23