Fast RTPS  Version 2.1.0
Fast RTPS
AnnotationDescriptor.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_ANNOTATION_DESCRIPTOR_H
16 #define TYPES_ANNOTATION_DESCRIPTOR_H
17 
18 #include <fastrtps/types/TypesBase.h>
19 #include <fastrtps/types/DynamicTypePtr.h>
20 
21 namespace eprosima{
22 namespace fastrtps{
23 namespace types{
24 
25 class MemberDescriptor;
26 class DynamicType;
27 
29 {
30 protected:
32 
34  std::map<std::string, std::string> value_;
35 
36 public:
41 
43  bool equals(const AnnotationDescriptor*) const;
44  bool is_consistent() const;
45  bool key_annotation() const;
46 
48  std::string& value,
49  const std::string& key);
50 
51  ReturnCode_t get_value(std::string& value); // key = "value"
52 
53  ReturnCode_t get_all_value(std::map<std::string, std::string>& value) const;
54 
56  const std::string& key,
57  const std::string& value);
58 
60 
61  const DynamicType_ptr type() const
62  {
63  return type_;
64  }
65 };
66 
67 } // namespace types
68 } // namespace fastrtps
69 } // namespace eprosima
70 
71 #endif // TYPES_ANNOTATION_DESCRIPTOR_H
eprosima::fastrtps::types::AnnotationDescriptor::get_value
ReturnCode_t get_value(std::string &value)
eprosima::fastrtps::types::AnnotationDescriptor::set_type
void set_type(DynamicType_ptr pType)
eprosima::fastrtps::types::AnnotationDescriptor
Definition: AnnotationDescriptor.h:29
eprosima::fastrtps::types::AnnotationDescriptor::is_consistent
bool is_consistent() const
eprosima::fastrtps::types::AnnotationDescriptor::type_
DynamicType_ptr type_
Definition: AnnotationDescriptor.h:33
eprosima::fastrtps::types::AnnotationDescriptor::equals
bool equals(const AnnotationDescriptor *) const
eprosima::fastrtps::types::AnnotationDescriptor::value_
std::map< std::string, std::string > value_
Definition: AnnotationDescriptor.h:34
eprosima::fastrtps::types::ReturnCode_t
Definition: TypesBase.h:204
eprosima::fastrtps::types::AnnotationDescriptor::AnnotationDescriptor
AnnotationDescriptor(DynamicType_ptr p_type)
eprosima::fastrtps::types::AnnotationDescriptor::get_all_value
ReturnCode_t get_all_value(std::map< std::string, std::string > &value) const
eprosima::fastrtps::types::DynamicTypeBuilderFactory
Definition: DynamicTypeBuilderFactory.h:40
eprosima::fastrtps::types::AnnotationDescriptor::AnnotationDescriptor
AnnotationDescriptor()
eprosima::fastrtps::types::AnnotationDescriptor::AnnotationDescriptor
AnnotationDescriptor(const AnnotationDescriptor *descriptor)
eprosima::fastrtps::types::AnnotationDescriptor::get_value
ReturnCode_t get_value(std::string &value, const std::string &key)
eprosima::fastrtps::types::AnnotationDescriptor::type
const DynamicType_ptr type() const
Definition: AnnotationDescriptor.h:61
eprosima::fastrtps::types::AnnotationDescriptor::key_annotation
bool key_annotation() const
eprosima::fastrtps::types::AnnotationDescriptor::~AnnotationDescriptor
~AnnotationDescriptor()
eprosima::fastrtps::types::AnnotationDescriptor::copy_from
ReturnCode_t copy_from(const AnnotationDescriptor *other)
eprosima::fastrtps::types::AnnotationDescriptor::set_value
ReturnCode_t set_value(const std::string &key, const std::string &value)
eprosima::fastrtps::types::DynamicType_ptr
Definition: DynamicTypePtr.h:27
eprosima
eProsima namespace.
Definition: LibrarySettingsAttributes.h:23