1.2.1. RegisterSystem

class eprosima::is::internal::Register

Static class that contains a static map of is::detail::SystemHandleFactoryBuilder instances.

is::detail::SystemHandleFactoryBuilder is nothing but a function signature that helps in the creation of a std::unique_ptr<SystemHandle> object.

In this way, each time a given SystemHandle instance is required, it will be created from the factory map.

Public Static Functions

void insert(std::string &&middleware, detail::SystemHandleFactoryBuilder &&handle)

Inserts a new is::detail::SystemHandleFactoryBuilder element in the factory map.

Parameters
  • [in] middleware: The middleware’s name.

  • [in] handle: The handle function responsible for creating the SystemHandle instance.

SystemHandleInfo get(const std::string &middleware)

Gets the SystemHandleInfo object associated to a given middleware.

Return

A SystemHandleInfo object which is properly initialized if the middleware exists and it is registered within the Register, or pointing to nullptr otherwise.

Parameters
  • [in] middleware: The middleware from which we want to obtain a SystemHandleInfo instance.

using eprosima::is::internal::SystemHandleInfoMap = std::map<std::string, SystemHandleInfo>
class eprosima::is::internal::SystemHandleInfo

Storage class that holds all the information relative to a certain SystemHandle instance.

This class will retrieve the corresponding TopicPublisherSystem, TopicSubscriberSystem, ServiceClientSystem and ServiceProviderSystem instances associated to the SystemHandle instance, if applicable.

If not applicable, these instances will just be cast to nullptr. Later on, this will allow to know whether a certain SystemHandle comes or not with any of these four working capabilities.

Also, a is::TypeRegistry is defined, where all the types that the SystemHandle instance must know prior to start performing any conversion are defined.

Public Functions

SystemHandleInfo(std::unique_ptr<SystemHandle> input)

Constructor.

Parameters
  • [in] input: The SystemHandle instance which we want to obtain information from.

SystemHandleInfo(const SystemHandleInfo &other) = delete

SystemHandleInfo shall not be copy constructible.

SystemHandleInfo(SystemHandleInfo &&other)

Move constructor.

Parameters

~SystemHandleInfo() = default

Destructor.

operator bool() const

bool() operator overload.

Return

true if the pointer to the handle is not nullptr, false otherwise.

Public Members

std::unique_ptr<SystemHandle> handle

Class members.