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> 31 mutable std::recursive_mutex m_MutexIdentifiers;
32 mutable std::recursive_mutex m_MutexObjects;
33 mutable std::recursive_mutex m_MutexInformations;
37 mutable std::map<const std::string, const TypeIdentifier*>
identifiers_;
39 std::map<const TypeIdentifier*, const TypeObject*>
objects_;
42 mutable std::map<const TypeIdentifier*, TypeInformation*>
informations_;
137 const std::string &type_name)
const;
148 const std::string& type_name,
149 bool complete =
false)
const;
155 const std::string& type_name)
const;
167 const std::string& type_name,
168 bool complete =
false)
const;
171 const std::string& type_name)
const;
178 const std::string& type_name,
180 bool complete =
false);
183 const std::string& type_name,
184 const std::vector<uint32_t> &bound,
185 bool complete =
false);
188 const std::string& key_type_name,
189 const std::string& value_type_name,
191 bool complete =
false);
194 const std::string& name,
202 const std::string& type_name,
206 const std::string& type_name,
211 const std::string& alias_name,
212 const std::string& target_type)
214 std::unique_lock<std::recursive_mutex> scoped(m_MutexIdentifiers);
215 aliases_.emplace(std::pair<std::string, std::string>(alias_name, target_type));
230 const OctetSeq& in_continuation_point,
232 size_t max_size)
const;
274 #endif // TYPE_OBJECT_TYPE_FACTORY_H Definition: TypeObject.h:4428
std::map< const TypeIdentifier *, const TypeObject * > complete_objects_
Definition: TypeObjectFactory.h:40
RTPS_DllAPI void add_type_object(const std::string &type_name, const TypeIdentifier *identifier, const TypeObject *object)
static RTPS_DllAPI TypeObjectFactory * get_instance()
std::vector< TypeIdentifier * > identifiers_created_
Definition: TypeObjectFactory.h:41
std::map< const TypeIdentifier *, TypeInformation * > informations_
Definition: TypeObjectFactory.h:42
void fill_complete_minimal_dependant_types(TypeInformation *info, const TypeIdentifier *identifier) const
Auxiliar function to fill minimal information with complete dependencies.
Definition: TypeObjectFactory.h:28
std::vector< TypeIdentifier > TypeIdentifierSeq
Definition: TypeIdentifier.h:421
RTPS_DllAPI bool typelookup_check_type_identifier(const TypeIdentifier &identifier) const
Checks if a TypeIdentifier is already known by the factory.
Definition: TypeDescriptor.h:29
DynamicType_ptr build_dynamic_type(TypeDescriptor &descriptor, const TypeObject *object, const DynamicType_ptr annotation_member_type=DynamicType_ptr(nullptr)) 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.
const TypeIdentifier * get_stored_type_identifier(const TypeIdentifier *identifier) const
uint32_t MemberId
Definition: TypesBase.h:272
void apply_member_annotations(DynamicTypeBuilder_ptr &parent_type_builder, MemberId member_id, const AppliedAnnotationSeq &annotations) const
RTPS_DllAPI bool is_type_identifier_complete(const TypeIdentifier *identifier) const
RTPS_DllAPI const TypeInformation * get_type_information(const std::string &type_name) const
get_type_information Retrieves the TypeInformation of the named type.
std::vector< TypeIdentifierWithSize > TypeIdentifierWithSizeSeq
Definition: TypeObject.h:4741
RTPS_DllAPI std::string get_type_name(const TypeKind kind) const
RTPS_DllAPI const TypeObject * typelookup_get_type_object_from_information(const TypeInformation &information) const
Retrieves the CompleteTypeObject from the given TypeInformation.
RTPS_DllAPI const TypeIdentifier * get_type_identifier(const std::string &type_name, bool complete=false) const
void fill_minimal_information(TypeInformation *info, const TypeIdentifier *ident) const
Fills the TypeInformation provided with the minimal TypeIdentifiers and its minimal dependencies...
void fill_complete_dependant_types(TypeInformation *info, const TypeIdentifier *identifier) const
Auxiliar function to fill complete dependencies.
void fill_minimal_dependant_types(TypeInformation *info, const TypeIdentifier *identifier) const
Auxiliar function to fill minimal dependencies.
RTPS_DllAPI const TypeIdentifier * get_sequence_identifier(const std::string &type_name, uint32_t bound, bool complete=false)
void apply_type_annotations(DynamicTypeBuilder_ptr &type_builder, const AppliedAnnotationSeq &annotations) const
RTPS_DllAPI const TypeIdentifier * get_array_identifier(const std::string &type_name, const std::vector< uint32_t > &bound, bool complete=false)
RTPS_DllAPI void add_type_identifier(const std::string &type_name, const TypeIdentifier *identifier)
eProsima namespace.
Definition: LibrarySettingsAttributes.h:23
std::map< std::string, std::string > aliases_
Definition: TypeObjectFactory.h:44
void nullify_all_entries(const TypeIdentifier *identifier)
RTPS_DllAPI const TypeIdentifier * get_string_identifier(uint32_t bound, bool wide=false)
std::map< const TypeIdentifier *, const TypeObject * > objects_
Definition: TypeObjectFactory.h:39
octet TypeKind
Definition: TypesBase.h:119
RTPS_DllAPI const TypeIdentifier * get_primitive_type_identifier(TypeKind kind) const
This class represents the enumeration ReturnCode_t.
Definition: TypesBase.h:188
std::vector< octet > OctetSeq
Definition: TypesBase.h:46
RTPS_DllAPI const TypeIdentifier * get_type_identifier_trying_complete(const std::string &type_name) const
std::string get_key_from_hash(const DynamicType_ptr annotation_descriptor_type, const NameHash &hash) const
std::vector< AppliedAnnotation > AppliedAnnotationSeq
Definition: AnnotationParameterValue.h:1124
std::array< uint8_t, 4 > NameHash
Definition: TypesBase.h:178
void create_builtin_annotations()
Definition: TypeIdentifier.h:80
RTPS_DllAPI TypeKind get_type_kind(const std::string &type_name) const
std::string generate_name_and_store_type_identifier(const TypeIdentifier *identifier) const
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)
RTPS_DllAPI void add_alias(const std::string &alias_name, const std::string &target_type)
Definition: TypeObjectFactory.h:210
void fill_complete_information(TypeInformation *info, const TypeIdentifier *ident) const
Fills the TypeInformation provided with the complete TypeIdentifiers and its complete dependencies if...
const TypeIdentifier * try_get_complete(const TypeIdentifier *identifier) const
static RTPS_DllAPI ReturnCode_t delete_instance()
Definition: DynamicTypeBuilderPtr.h:26
std::map< const std::string, const TypeIdentifier * > identifiers_
Definition: TypeObjectFactory.h:37
RTPS_DllAPI const TypeObject * get_type_object(const std::string &type_name, bool complete=false) const
std::vector< TypeInformation * > informations_created_
Definition: TypeObjectFactory.h:43
std::map< const std::string, const TypeIdentifier * > complete_identifiers_
Definition: TypeObjectFactory.h:38
Definition: DynamicTypePtr.h:26
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...