findObserver overloads

Synopses

Declared in <ball_broadcastobserver.h>

Return a shared pointer to the observer having the specified observerName in the registry of this broadcast observer, and an empty shared pointer if there is no such observer otherwise.

bsl::shared_ptr<Observer>
findObserver(std::string_view const& observerName);

Return a shared pointer to the observer having the specified observerName in the registry of this broadcast observer, and an empty shared pointer if there is no such observer otherwise.

bsl::shared_ptr<Observer const>
findObserver(std::string_view const& observerName) const;

Load into the specified result a shared pointer to the observer of (template parameter) t_OBSERVER type having the specified observerName in the registry of this broadcast observer, and an empty shared pointer if there is no such observer otherwise. Return 0 if a non‐empty shared pointer was loaded, and a non‐zero value otherwise. Note that an empty shared pointer will be loaded if either no observer having observerName is in the registry or the observer registered with that name is not of t_OBSERVER type.

template<class t_OBSERVER>
int
findObserver(
    bsl::shared_ptr<t_OBSERVER>* result,
    std::string_view const& observerName)
requires bsl::is_convertible<t_OBSERVER *, ball::Observer *>::value;

Load into the specified result a shared pointer to the observer of (template parameter) t_OBSERVER type having the specified observerName in the registry of this broadcast observer, and an empty shared pointer if there is no such observer otherwise. Return 0 if a non‐empty shared pointer was loaded, and a non‐zero value otherwise. Note that an empty shared pointer will be loaded if either no observer having observerName is in the registry or the observer registered with that name is not of t_OBSERVER type.

template<class t_OBSERVER>
int
findObserver(
    bsl::shared_ptr<t_OBSERVER const>* result,
    std::string_view const& observerName) const
requires bsl::is_convertible<const t_OBSERVER *,
                                             const ball::Observer *>::value;

Created with MrDocs