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

Add the specified `collector` with the specified `name` to this registry&period; Return 0 if `collector` was successfully registered, and a non&hyphen;zero value (with no effect) otherwise&period; Note that this method will fail if a collector having `name` is already registered&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
addCollector(
    xref:BloombergLP/ball/AttributeCollectorRegistry/Collector.adoc[Collector] const& collector,
    std::string&lowbar;view const& name);
----


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