Load a typed shared pointer to the named observer into result.

Synopsis

Declared in <ball_loggermanager.h>

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

Description

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 logger manager, 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.

Return Value

0 if a non‐empty shared pointer was loaded, and a non‐zero value otherwise

Parameters

Name

Description

result

destination for the typed shared pointer to the observer

observerName

name of the observer to find

Created with MrDocs