[#BloombergLP-balb-Sequence4-accessAttribute-01]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balb.adoc[balb]::xref:BloombergLP/balb/Sequence4.adoc[Sequence4]::accessAttribute
:relfileprefix: ../../../
:mrdocs:

Invoke the specified accessor on the attribute indicated by `name`&period;

== Synopsis

Declared in `&lt;balb&lowbar;testmessages&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ACCESSOR&gt;
int
accessAttribute(
    ACCESSOR& accessor,
    char const* name,
    int nameLength) const;
----

== Description

Invoke the specified `accessor` on the (non&hyphen;modifiable) attribute of this object indicated by the specified `name` of the specified `nameLength`, supplying `accessor` with the corresponding attribute information structure&period; Return the value returned from the invocation of `accessor` if `name` identifies an attribute of this class, and &hyphen;1 otherwise&period;

== Return Value

value returned from the invocation of `accessor` if `name` identifies an attribute of this class, and &hyphen;1 otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *accessor*
| functor invoked on the matching attribute
| *name*
| attribute name
| *nameLength*
| length of `name`
|===


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