[#BloombergLP-bdlat_SequenceFunctions-accessAttributes] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlat_SequenceFunctions.adoc[bdlat_SequenceFunctions]::accessAttributes :relfileprefix: ../../ :mrdocs: Invoke an accessor on each attribute of a sequence. == Synopsis Declared in `<bdlat_sequencefunctions.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class TYPE, class ACCESSOR> int accessAttributes( TYPE const& object, ACCESSOR& accessor); ---- == Description Invoke the specified `accessor` sequentially on each attribute of the specified `object`, supplying `accessor` with the corresponding attribute information structure until such invocation returns a non‐zero value. The supplied `accessor` must be a callable type that can be called as if it had the following signature: ` template <class t_INFO> int accessor(const ATTRIBUTE_TYPE& attribute, const t_INFO& info); ` Return the value from the last invocation of `accessor` (i.e., the invocation that terminated the sequence). == Return Value value from the last invocation of `accessor` == Parameters [cols="1,4"] |=== | Name| Description | *object* | sequence whose attributes are accessed | *accessor* | callable invoked with each attribute and its info |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#