[#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. Return 0 if `collector` was successfully registered, and a non‐zero value (with no effect) otherwise. Note that this method will fail if a collector having `name` is already registered. == Synopsis Declared in `<ball_attributecollectorregistry.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int addCollector( xref:BloombergLP/ball/AttributeCollectorRegistry/Collector.adoc[Collector] const& collector, std::string_view const& name); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#