15#ifndef TYPE_OBJECT_TYPE_FACTORY_H
16#define TYPE_OBJECT_TYPE_FACTORY_H
18#include <fastrtps/types/TypeObject.h>
19#include <fastrtps/types/DynamicTypeBuilder.h>
20#include <fastrtps/types/DynamicTypeBuilderPtr.h>
21#include <fastrtps/types/DynamicTypePtr.h>
32 mutable std::recursive_mutex m_MutexIdentifiers;
33 mutable std::recursive_mutex m_MutexObjects;
34 mutable std::recursive_mutex m_MutexInformations;
39 mutable std::map<const std::string, const TypeIdentifier*>
identifiers_;
41 std::map<const TypeIdentifier*, const TypeObject*>
objects_;
44 mutable std::map<const TypeIdentifier*, TypeInformation*>
informations_;
142 const std::string& type_name)
const;
153 const std::string& type_name,
154 bool complete =
false)
const;
160 const std::string& type_name)
const;
172 const std::string& type_name,
173 bool complete =
false)
const;
176 const std::string& type_name)
const;
183 const std::string& type_name,
185 bool complete =
false);
188 const std::string& type_name,
189 const std::vector<uint32_t>& bound,
190 bool complete =
false);
193 const std::string& key_type_name,
194 const std::string& value_type_name,
196 bool complete =
false);
199 const std::string& name,
207 const std::string& type_name,
211 const std::string& type_name,
216 const std::string& alias_name,
217 const std::string& target_type)
219 std::unique_lock<std::recursive_mutex> scoped(m_MutexIdentifiers);
220 aliases_.emplace(std::pair<std::string, std::string>(alias_name, target_type));
235 const OctetSeq& in_continuation_point,
237 size_t max_size)
const;
Definition DynamicTypePtr.h:27
Definition DynamicTypeBuilderPtr.h:27
This class represents the enumeration ReturnCode_t.
Definition TypesBase.h:190
Definition TypeDescriptor.h:30
Definition TypeIdentifier.h:81
Definition TypeObjectFactory.h:29
RTPS_DllAPI const TypeIdentifier * get_type_identifier_trying_complete(const std::string &type_name) const
RTPS_DllAPI const TypeInformation * get_type_information(const std::string &type_name) const
get_type_information Retrieves the TypeInformation of the named type.
const TypeIdentifier * try_get_complete(const TypeIdentifier *identifier) const
std::map< const std::string, const TypeIdentifier * > complete_identifiers_
Definition TypeObjectFactory.h:40
std::vector< TypeInformation * > informations_created_
Definition TypeObjectFactory.h:45
RTPS_DllAPI const TypeIdentifier * get_primitive_type_identifier(TypeKind kind) const
RTPS_DllAPI const TypeObject * get_type_object(const TypeIdentifier *identifier) const
void fill_complete_information(TypeInformation *info, const TypeIdentifier *ident) const
Fills the TypeInformation provided with the complete TypeIdentifiers and its complete dependencies if...
RTPS_DllAPI std::string get_type_name(const TypeKind kind) const
std::map< const TypeIdentifier *, TypeInformation * > informations_
Definition TypeObjectFactory.h:44
RTPS_DllAPI const TypeIdentifier * get_sequence_identifier(const std::string &type_name, uint32_t bound, bool complete=false)
RTPS_DllAPI void add_alias(const std::string &alias_name, const std::string &target_type)
Definition TypeObjectFactory.h:215
std::map< const TypeIdentifier *, const TypeObject * > objects_
Definition TypeObjectFactory.h:41
RTPS_DllAPI void add_type_object(const std::string &type_name, const TypeIdentifier *identifier, const TypeObject *object)
void create_builtin_annotations()
static RTPS_DllAPI TypeObjectFactory * get_instance()
RTPS_DllAPI const TypeIdentifier * get_array_identifier(const std::string &type_name, const std::vector< uint32_t > &bound, bool complete=false)
RTPS_DllAPI TypeKind get_type_kind(const std::string &type_name) const
RTPS_DllAPI bool typelookup_check_type_identifier(const TypeIdentifier &identifier) const
Checks if a TypeIdentifier is already known by the factory.
void apply_member_annotations(DynamicTypeBuilder_ptr &parent_type_builder, MemberId member_id, const AppliedAnnotationSeq &annotations) const
std::map< std::string, std::string > aliases_
Definition TypeObjectFactory.h:46
RTPS_DllAPI const TypeIdentifier * get_map_identifier(const std::string &key_type_name, const std::string &value_type_name, uint32_t bound, bool complete=false)
std::string get_key_from_hash(const DynamicType_ptr annotation_descriptor_type, const NameHash &hash) const
RTPS_DllAPI DynamicType_ptr build_dynamic_type(const std::string &name, const TypeIdentifier *identifier, const TypeObject *object=nullptr) const
void fill_complete_minimal_dependant_types(TypeInformation *info, const TypeIdentifier *identifier) const
Auxiliar function to fill minimal information with complete dependencies.
static RTPS_DllAPI ReturnCode_t delete_instance()
void fill_minimal_dependant_types(TypeInformation *info, const TypeIdentifier *identifier) const
Auxiliar function to fill minimal dependencies.
RTPS_DllAPI bool is_type_identifier_complete(const TypeIdentifier *identifier) const
std::map< const std::string, const TypeIdentifier * > identifiers_
Definition TypeObjectFactory.h:39
RTPS_DllAPI TypeInformation * get_type_information(const TypeIdentifier *identifier) const
get_type_information Retrieves the TypeInformation of the given TypeIdentifier.
std::map< const TypeIdentifier *, const TypeObject * > complete_objects_
Definition TypeObjectFactory.h:42
RTPS_DllAPI std::string get_type_name(const TypeIdentifier *identifier) const
RTPS_DllAPI const TypeIdentifier * get_type_identifier(const std::string &type_name, bool complete=false) const
RTPS_DllAPI const TypeObject * get_type_object(const std::string &type_name, bool complete=false) const
RTPS_DllAPI const TypeObject * typelookup_get_type_object_from_information(const TypeInformation &information) const
Retrieves the CompleteTypeObject from the given TypeInformation.
RTPS_DllAPI void add_type_identifier(const std::string &type_name, const TypeIdentifier *identifier)
void fill_complete_dependant_types(TypeInformation *info, const TypeIdentifier *identifier) const
Auxiliar function to fill complete dependencies.
DynamicType_ptr build_dynamic_type(TypeDescriptor &descriptor, const TypeObject *object, const DynamicType_ptr annotation_member_type=DynamicType_ptr(nullptr)) const
void fill_minimal_information(TypeInformation *info, const TypeIdentifier *ident) const
Fills the TypeInformation provided with the minimal TypeIdentifiers and its minimal dependencies.
void apply_type_annotations(DynamicTypeBuilder_ptr &type_builder, const AppliedAnnotationSeq &annotations) const
RTPS_DllAPI const TypeIdentifier * typelookup_get_type(const TypeIdentifier &identifier, TypeObject &object) const
Fills the given object with the complete version of the given identifier.
void create_basic_identifiers()
std::string generate_name_and_store_type_identifier(const TypeIdentifier *identifier) const
RTPS_DllAPI const TypeIdentifier * get_string_identifier(uint32_t bound, bool wide=false)
RTPS_DllAPI TypeIdentifierWithSizeSeq typelookup_get_type_dependencies(const TypeIdentifierSeq &identifiers, const OctetSeq &in_continuation_point, OctetSeq &out_continuation_point, size_t max_size) const
Returns a TypeIdentifierWithSizeSeq object filled with the dependencies of the given identifiers.
void nullify_all_entries(const TypeIdentifier *identifier)
const TypeIdentifier * get_stored_type_identifier(const TypeIdentifier *identifier) const
std::vector< TypeIdentifier * > identifiers_created_
Definition TypeObjectFactory.h:43
Definition TypeObject.h:7431
uint32_t MemberId
Definition TypesBase.h:285
std::vector< TypeIdentifier > TypeIdentifierSeq
Definition TypeIdentifier.h:428
std::vector< TypeIdentifierWithSize > TypeIdentifierWithSizeSeq
Definition TypeObject.h:7863
std::vector< octet > OctetSeq
Definition TypesBase.h:47
std::vector< AppliedAnnotation > AppliedAnnotationSeq
Definition AnnotationParameterValue.h:1150
octet TypeKind
Definition TypesBase.h:120
std::array< uint8_t, 4 > NameHash
Definition TypesBase.h:179
eProsima namespace.
Definition LibrarySettingsAttributes.h:23