[#BloombergLP-ball-AttributeCollectorRegistry] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/ball.adoc[ball]::AttributeCollectorRegistry :relfileprefix: ../../ :mrdocs: This component maintains a registry of named functors ("collectors") that are used to transform opaque user data into a set of `ball::Attribute` objects. == Synopsis Declared in `<ball_attributecollectorregistry.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class AttributeCollectorRegistry; ---- == Type Aliases [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/AttributeCollectorRegistry/Collector.adoc[`Collector`] | `Collector` is the type of a user‐supplied attribute collector functor. | xref:BloombergLP/ball/AttributeCollectorRegistry/Visitor.adoc[`Visitor`] | `Visitor` is the type of a user‐supplied visit functor. | xref:BloombergLP/ball/AttributeCollectorRegistry/allocator_type.adoc[`allocator_type`] | This `typedef` is an alias for the allocator used by this object. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:BloombergLP/ball/AttributeCollectorRegistry/2constructor-0d.adoc[`AttributeCollectorRegistry`] [.small]#[constructor]# | Constructors | xref:BloombergLP/ball/AttributeCollectorRegistry/2destructor.adoc[`~AttributeCollectorRegistry`] [.small]#[destructor]# | Destroy this registry. | xref:BloombergLP/ball/AttributeCollectorRegistry/addCollector.adoc[`addCollector`] | 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. | xref:BloombergLP/ball/AttributeCollectorRegistry/collect.adoc[`collect`] | Invoke all registered collectors with the specified `visitor` functor. Note that collectors are invoked in the order in which collectors are registered. | xref:BloombergLP/ball/AttributeCollectorRegistry/get_allocator.adoc[`get_allocator`] | Return the allocator used by this object to supply memory. Note that if no allocator was supplied at construction the default allocator in effect at construction is used. | xref:BloombergLP/ball/AttributeCollectorRegistry/hasCollector.adoc[`hasCollector`] | Return `true` if a collector having the specified `name` is in the registry maintained by this object, and `false` otherwise. Note that this method is provided primarily for debugging purposes (i.e., its return value can be invalidated from another thread). | xref:BloombergLP/ball/AttributeCollectorRegistry/numCollectors.adoc[`numCollectors`] | Return the number of collectors registered with this object. Note that this method is provided primarily for debugging purposes (i.e., its return value can be invalidated from another thread). | xref:BloombergLP/ball/AttributeCollectorRegistry/removeAll.adoc[`removeAll`] | Remove all collectors from this registry. | xref:BloombergLP/ball/AttributeCollectorRegistry/removeCollector.adoc[`removeCollector`] | Remove the collector having the specified `name` from this registry. Return 0 if the collector with `name` was successfully removed, and a non‐zero value (with no effect) otherwise. | xref:BloombergLP/ball/AttributeCollectorRegistry/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<AttributeCollectorRegistry, UsesBslmaAllocator>`] | Declare that this type uses a `bslma` allocator. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#