message_router_registry
message_router_registryFrom:
20.6.0A class that will act as a registry for all message router types.
When iterating through the registry, routers with identical IDs are ordered by insertion.
Defines the following classes
etl::imessage_router_registry
etl::message_router_registryimessage_router_registry
The base class for all router registries.
Iterators
iterator
const_iteratorMember functions
iterator begin()
const_iterator begin() const
const_iterator cbegin() constGet the beginning of the registry.
iterator end()
const_iterator end() const
const_iterator cend() constGet the end of the registry.
iterator lower_bound(etl::message_router_id_t id)
const_iterator lower_bound(etl::message_router_id_t id) constGet the lower bound in the registry of the router with the specified ID.
iterator upper_bound(etl::message_router_id_t id)
const_iterator upper_bound(etl::message_router_id_t id) constGet the upper bound in the registry of the router with the specified ID.
etl::imessage_router* find(etl::message_router_id_t id)
const etl::imessage_router* find(etl::message_router_id_t id) constReturns a pointer to the first router with the specified ID, or ETL_NULLPTR if it cannot be found.
void add(etl::imessage_router& router)
void add(etl::imessage_router* p_router)Registers a router.
If the registry is full then an ETL assert is emitted (etl::message_router_registry_full).
Duplicate routers will be ignored.
template <typename TIterator>
void add(TIterator first, const TIterator& last)Registers a collection of routers.
If the registry becomes full then an ETL assert is emitted (etl::message_router_registry_full).
Duplicate routers will be ignored.
void remove(etl::message_router_id_t id)Unregisters a router.
bool contains(const etl::message_router_id_t id) const
bool contains(const etl::imessage_router* const p_router) const
bool contains(const etl::imessage_router& router) constReturns true if the registry contains a router that has the specified ID or object.
bool empty() constReturns true if the registry is empty, otherwise false.
bool full() constReturns true if the registry is full, otherwise false.
size_t size() constReturns the size of the registry.
size_t available() constReturns the available size of the registry.
size_t max_size() constReturns the maximum size of the registry.
message_router_registry
message_router_registry()Default constructor.
template <typename TIterator>
message_router_registry(TIterator first, const TIterator& last)Constructs from an iterator range.
message_router_registry(std::initializer_list<etl::imessage_router*> init)Initializer_list constructor.
Enabled for C++11 or above.
message_router_registry(const message_router_registry& rhs)Copy constructor.
message_router_registry& operator =(const message_router_registry& rhs)Assignment operator.