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

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

== Synopsis

Declared in `&lt;balber&lowbar;berdecoderoptions&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ACCESSOR&gt;
int
accessAttribute(
    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 from `accessor`, or &hyphen;1 if `id` is not found

== Parameters

[cols="1,4"]
|===
| Name| Description
| *accessor*
| functor invoked on the selected attribute
| *id*
| attribute identifier to access
|===


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