Fast DDS  Version 3.6.1.0
Fast DDS
ITypeObjectRegistry.hpp
1 // Copyright 2023 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 
20 #ifndef FASTDDS_DDS_XTYPES_TYPE_REPRESENTATION__ITYPEOBJECTREGISTRY_HPP
21 #define FASTDDS_DDS_XTYPES_TYPE_REPRESENTATION__ITYPEOBJECTREGISTRY_HPP
22 
23 #include <string>
24 
25 #include <fastdds/dds/core/ReturnCode.hpp>
26 #include <fastdds/dds/xtypes/dynamic_types/DynamicType.hpp>
27 #include <fastdds/dds/xtypes/type_representation/TypeObject.hpp>
28 #include <fastdds/fastdds_dll.hpp>
29 
30 namespace eprosima {
31 namespace fastdds {
32 namespace dds {
33 
34 namespace xtypes {
35 
37 {
38  // Minimal TypeObject
40  // Complete TypeObject
42 };
43 
45 {
46 public:
47 
66  virtual FASTDDS_EXPORTED_API ReturnCode_t register_type_object(
67  const std::string& type_name,
68  const CompleteTypeObject& complete_type_object,
69  TypeIdentifierPair& type_ids) = 0;
70 
91  virtual FASTDDS_EXPORTED_API ReturnCode_t register_type_object(
92  const TypeObject& type_object,
93  TypeIdentifierPair& type_ids) = 0;
94 
102  virtual FASTDDS_EXPORTED_API ReturnCode_t register_typeobject_w_dynamic_type(
103  const DynamicType::_ref_type& dynamic_type,
104  TypeIdentifierPair& type_ids) = 0;
105 
122  virtual FASTDDS_EXPORTED_API ReturnCode_t register_type_identifier(
123  const std::string& type_name,
124  TypeIdentifierPair& type_identifier) = 0;
125 
138  virtual FASTDDS_EXPORTED_API ReturnCode_t get_type_objects(
139  const std::string& type_name,
140  TypeObjectPair& type_objects) = 0;
141 
155  virtual FASTDDS_EXPORTED_API ReturnCode_t get_type_identifiers(
156  const std::string& type_name,
157  TypeIdentifierPair& type_identifiers) = 0;
158 
170  virtual FASTDDS_EXPORTED_API ReturnCode_t get_type_object(
171  const TypeIdentifier& type_identifier,
172  TypeObject& type_object) = 0;
173 
183  virtual FASTDDS_EXPORTED_API ReturnCode_t get_complete_type_object(
184  const TypeIdentifierPair& type_identifiers,
185  CompleteTypeObject& type_object) = 0;
186 
200  virtual FASTDDS_EXPORTED_API ReturnCode_t get_type_information(
201  const TypeIdentifierPair& type_ids,
202  TypeInformation& type_information,
203  bool with_dependencies = false) = 0;
204 };
205 
206 
207 } // xtypes
208 } // dds
209 } // fastdds
210 } // eprosima
211 
212 #endif // FASTDDS_DDS_XTYPES_TYPE_REPRESENTATION__ITYPEOBJECTREGISTRY_HPP
213 
214 
typename traits< DynamicType >::ref_type _ref_type
Definition: DynamicType.hpp:36
This class represents the union CompleteTypeObject defined by the user in the IDL file.
Definition: dds_xtypes_typeobject.hpp:20770
Definition: ITypeObjectRegistry.hpp:45
virtual FASTDDS_EXPORTED_API ReturnCode_t get_type_object(const TypeIdentifier &type_identifier, TypeObject &type_object)=0
Get the TypeObject related to the given TypeIdentifier.
virtual FASTDDS_EXPORTED_API ReturnCode_t register_type_object(const TypeObject &type_object, TypeIdentifierPair &type_ids)=0
Register a remote TypeObject.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_type_information(const TypeIdentifierPair &type_ids, TypeInformation &type_information, bool with_dependencies=false)=0
Get the TypeInformation related to a specific type_name.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_complete_type_object(const TypeIdentifierPair &type_identifiers, CompleteTypeObject &type_object)=0
Get the CompleteTypeObject related to the given type identifiers.
virtual FASTDDS_EXPORTED_API ReturnCode_t register_type_object(const std::string &type_name, const CompleteTypeObject &complete_type_object, TypeIdentifierPair &type_ids)=0
Register a local TypeObject.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_type_identifiers(const std::string &type_name, TypeIdentifierPair &type_identifiers)=0
Get the TypeIdentifiers related to the given type name.
virtual FASTDDS_EXPORTED_API ReturnCode_t get_type_objects(const std::string &type_name, TypeObjectPair &type_objects)=0
Get the TypeObjects related to the given type name.
virtual FASTDDS_EXPORTED_API ReturnCode_t register_typeobject_w_dynamic_type(const DynamicType::_ref_type &dynamic_type, TypeIdentifierPair &type_ids)=0
Register DynamicType TypeObject.
virtual FASTDDS_EXPORTED_API ReturnCode_t register_type_identifier(const std::string &type_name, TypeIdentifierPair &type_identifier)=0
Register an indirect hash TypeIdentifier.
This class represents the union TypeIdentifier defined by the user in the IDL file.
Definition: dds_xtypes_typeobject.hpp:2820
This class represents the structure TypeIdentifierPair defined by the user in the IDL file.
Definition: dds_xtypes_typeobject.hpp:24033
This class represents the structure TypeInformation defined by the user in the IDL file.
Definition: dds_xtypes_typeobject.hpp:24606
This class represents the union TypeObject defined by the user in the IDL file.
Definition: dds_xtypes_typeobject.hpp:23463
Definition: DomainParticipant.hpp:46
eprosima::fastdds::dds::ReturnCode_t ReturnCode_t
Definition: TypeObjectUtils.hpp:45
Definition: ITypeObjectRegistry.hpp:37
TypeObject complete_type_object
Definition: ITypeObjectRegistry.hpp:41
TypeObject minimal_type_object
Definition: ITypeObjectRegistry.hpp:39