[#BloombergLP-balxml-DecoderOptions-accessAttribute-0d]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/DecoderOptions.adoc[DecoderOptions]::accessAttribute
:relfileprefix: ../../../
:mrdocs:

Invoke `accessor` on the non&hyphen;modifiable attribute indicated by `id`&period;

== Synopsis

Declared in `&lt;balxml&lowbar;decoderoptions&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename t&lowbar;ACCESSOR&gt;
int
accessAttribute(
    t&lowbar;ACCESSOR& accessor,
    int id) const;
----

== Description

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

== Return Value

value returned by `accessor`, or &hyphen;1 if `id` is not found

== Parameters

[cols="1,4"]
|===
| Name| Description
| *accessor*
| functor invoked on the matching attribute
| *id*
| attribute id
|===


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