[#BloombergLP-ball-BroadcastObserver-findObserver-09]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::xref:BloombergLP/ball/BroadcastObserver.adoc[BroadcastObserver]::findObserver
:relfileprefix: ../../../
:mrdocs:

`findObserver` overloads

== Synopses

Declared in `&lt;ball&lowbar;broadcastobserver&period;h&gt;`

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&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/shared_ptr-0a.adoc[bsl::shared&lowbar;ptr&lt;Observer&gt;]
xref:BloombergLP/ball/BroadcastObserver/findObserver-037.adoc[findObserver](std::string&lowbar;view const& observerName);
----

[.small]#xref:BloombergLP/ball/BroadcastObserver/findObserver-037.adoc[_» more&period;&period;&period;_]#

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&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:bsl/shared_ptr-0a.adoc[bsl::shared&lowbar;ptr&lt;Observer const&gt;]
xref:BloombergLP/ball/BroadcastObserver/findObserver-031.adoc[findObserver](std::string&lowbar;view const& observerName) const;
----

[.small]#xref:BloombergLP/ball/BroadcastObserver/findObserver-031.adoc[_» more&period;&period;&period;_]#

Load into the specified `result` a shared pointer to the observer of (template parameter) `t&lowbar;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&period; Return 0 if a non&hyphen;empty shared pointer was loaded, and a non&hyphen;zero value otherwise&period; 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&lowbar;OBSERVER` type&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;OBSERVER&gt;
int
xref:BloombergLP/ball/BroadcastObserver/findObserver-01.adoc[findObserver](
    xref:bsl/shared_ptr-0a.adoc[bsl::shared&lowbar;ptr&lt;t&lowbar;OBSERVER&gt;]* result,
    std::string&lowbar;view const& observerName)
requires bsl&colon;&colon;is&lowbar;convertible&lt;t&lowbar;OBSERVER &ast;, ball&colon;&colon;Observer &ast;&gt;&colon;&colon;value;
----

[.small]#xref:BloombergLP/ball/BroadcastObserver/findObserver-01.adoc[_» more&period;&period;&period;_]#

Load into the specified `result` a shared pointer to the observer of (template parameter) `t&lowbar;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&period; Return 0 if a non&hyphen;empty shared pointer was loaded, and a non&hyphen;zero value otherwise&period; 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&lowbar;OBSERVER` type&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;OBSERVER&gt;
int
xref:BloombergLP/ball/BroadcastObserver/findObserver-0a.adoc[findObserver](
    xref:bsl/shared_ptr-0a.adoc[bsl::shared&lowbar;ptr&lt;t&lowbar;OBSERVER const&gt;]* result,
    std::string&lowbar;view const& observerName) const
requires bsl&colon;&colon;is&lowbar;convertible&lt;const t&lowbar;OBSERVER &ast;,
                                             const ball&colon;&colon;Observer &ast;&gt;&colon;&colon;value;
----

[.small]#xref:BloombergLP/ball/BroadcastObserver/findObserver-0a.adoc[_» more&period;&period;&period;_]#


[.small]#Created with https://www.mrdocs.com[MrDocs]#
