Fast RTPS  Version 2.14.1
Fast RTPS
Loading...
Searching...
No Matches
DynamicTypeMember.h
1// Copyright 2018 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 TYPES_DYNAMIC_TYPE_MEMBER_H
16#define TYPES_DYNAMIC_TYPE_MEMBER_H
17
18#include <fastrtps/types/TypesBase.h>
19#include <fastrtps/types/MemberDescriptor.h>
20
21namespace eprosima {
22namespace fastrtps {
23namespace types {
24
25class AnnotationDescriptor;
26class DynamicType;
27
29{
30protected:
31
35
36 uint32_t get_index() const;
37
39 uint32_t index);
40
42 DynamicType* pType);
43
44 friend class DynamicTypeBuilder;
45 friend class DynamicType;
46 friend class DynamicData;
47
48public:
49
50 RTPS_DllAPI DynamicTypeMember();
51
52 RTPS_DllAPI DynamicTypeMember(
53 const DynamicTypeMember* other);
54
55 RTPS_DllAPI DynamicTypeMember(
56 const MemberDescriptor* descriptor,
57 MemberId id);
58
60
62 AnnotationDescriptor& descriptor);
63
65 const std::string& annotation_name,
66 const std::string& key,
67 const std::string& value);
68
69 RTPS_DllAPI bool equals(
70 const DynamicTypeMember*) const;
71
73 AnnotationDescriptor& descriptor,
74 uint32_t idx);
75
76 RTPS_DllAPI uint32_t get_annotation_count();
77
78 RTPS_DllAPI bool key_annotation() const;
79
80 RTPS_DllAPI std::vector<uint64_t> get_union_labels() const;
81
83 MemberDescriptor* descriptor) const;
84
85 RTPS_DllAPI MemberId get_id() const;
86
87 RTPS_DllAPI std::string get_name() const;
88
89 RTPS_DllAPI bool is_default_union_value() const;
90
91 RTPS_DllAPI const MemberDescriptor* get_descriptor() const
92 {
93 return &descriptor_;
94 }
95
96};
97
98} // namespace types
99} // namespace fastrtps
100} // namespace eprosima
101
102#endif // TYPES_DYNAMIC_TYPE_MEMBER_H
Definition AnnotationDescriptor.h:29
Definition DynamicData.h:44
Definition DynamicTypeBuilder.h:32
Definition DynamicType.h:38
Definition DynamicTypeMember.h:29
MemberDescriptor descriptor_
Definition DynamicTypeMember.h:33
RTPS_DllAPI DynamicTypeMember(const DynamicTypeMember *other)
RTPS_DllAPI const MemberDescriptor * get_descriptor() const
Definition DynamicTypeMember.h:91
RTPS_DllAPI ReturnCode_t apply_annotation(AnnotationDescriptor &descriptor)
RTPS_DllAPI bool equals(const DynamicTypeMember *) const
RTPS_DllAPI std::string get_name() const
RTPS_DllAPI std::vector< uint64_t > get_union_labels() const
RTPS_DllAPI ReturnCode_t get_annotation(AnnotationDescriptor &descriptor, uint32_t idx)
RTPS_DllAPI ReturnCode_t get_descriptor(MemberDescriptor *descriptor) const
DynamicType * parent_
Definition DynamicTypeMember.h:32
MemberId id_
Definition DynamicTypeMember.h:34
RTPS_DllAPI bool is_default_union_value() const
RTPS_DllAPI MemberId get_id() const
RTPS_DllAPI DynamicTypeMember(const MemberDescriptor *descriptor, MemberId id)
RTPS_DllAPI ReturnCode_t apply_annotation(const std::string &annotation_name, const std::string &key, const std::string &value)
Definition MemberDescriptor.h:29
This class represents the enumeration ReturnCode_t.
Definition TypesBase.h:190
uint32_t MemberId
Definition TypesBase.h:285
eProsima namespace.
Definition LibrarySettingsAttributes.h:23