Fast RTPS  Version 2.9.1
Fast RTPS
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 RTPS_DllAPI static void print(
33 const DynamicData_ptr& data);
34
35 RTPS_DllAPI static void print(
36 const DynamicData* data);
37
38protected:
40 DynamicData* data,
41 MemberId id,
42 TypeKind kind);
43
44 static void print_collection(
45 DynamicData* data,
46 const std::string& tabs = "");
47
49 const std::vector<uint32_t>& bounds,
50 std::vector<std::vector<uint32_t>>& positions);
51
52 static void get_index_position(
53 uint32_t index,
54 const std::vector<uint32_t>& bounds,
55 std::vector<uint32_t>& position);
56
57 static void aux_index_position(
58 uint32_t index,
59 uint32_t inner_index,
60 const std::vector<uint32_t>& bounds,
61 std::vector<uint32_t>& position);
62
64 DynamicData* data);
65
67 DynamicData* data,
68 const std::string& tabs = "");
69
71 DynamicData* data,
72 MemberId id,
73 const std::string& tabs = "");
74
75 static void print_member(
76 DynamicData* data,
77 const DynamicTypeMember* type,
78 const std::string& tabs = "");
79};
80
81} // namespace types
82} // namespace fastrtps
83} // namespace eprosima
84
85#endif // _FASTRTPS_TYPES_DYNAMICDATAHELPER_HPP_
Definition: DynamicDataPtr.h:27
Definition: DynamicDataHelper.hpp:30
static void print_complex_element(DynamicData *data, MemberId id, const std::string &tabs="")
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 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_collection(DynamicData *data, const std::string &tabs="")
static RTPS_DllAPI void print(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_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:272
octet TypeKind
Definition: TypesBase.h:119
eProsima namespace.
Definition: LibrarySettingsAttributes.h:23