[#BloombergLP-ball-ObserverAdapter]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::ObserverAdapter
:relfileprefix: ../../
:mrdocs:

This class aids in the implementation of the `Observer` protocol by allowing clients to implement that protocol by implementing a single method signature&colon; `publish(const Record&amp;, const Context&amp;)`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class ObserverAdapter
    : public xref:BloombergLP/ball/Observer.adoc[Observer]
----

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/ball/Observer.adoc[Observer]`
| This class provides a protocol for receiving and processing log record output&period;
|===

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/ball/ObserverAdapter/2destructor.adoc[`&#126;ObserverAdapter`] [.small]#[destructor]# [.small]#[virtual]#
| Destroy this observer&period;
| xref:BloombergLP/ball/ObserverAdapter/publish-0c1.adoc[`publish`] 
| `publish` overloads
| xref:BloombergLP/ball/ObserverAdapter/releaseRecords.adoc[`releaseRecords`]  [.small]#[virtual]#
| Discard any shared reference to a `Record` object that was supplied to the `publish` method and is held by this observer&period; Note that classes that derive from `ObserverAdapter` should _not_ implement this method&period; Also note that this operation should be called if resources underlying the previously provided shared&hyphen;pointers must be released&period;
|===



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