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

`accessAttribute` overloads

== Synopses

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

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ACCESSOR&gt;
int
xref:BloombergLP/balber/BerDecoderOptions/accessAttribute-0d.adoc[accessAttribute](
    ACCESSOR& accessor,
    int id) const;
----

[.small]#xref:BloombergLP/balber/BerDecoderOptions/accessAttribute-0d.adoc[_» more&period;&period;&period;_]#

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ACCESSOR&gt;
int
xref:BloombergLP/balber/BerDecoderOptions/accessAttribute-0b.adoc[accessAttribute](
    ACCESSOR& accessor,
    char const* name,
    int nameLength) const;
----

[.small]#xref:BloombergLP/balber/BerDecoderOptions/accessAttribute-0b.adoc[_» more&period;&period;&period;_]#

== Return Value

* value from `accessor`, or &hyphen;1 if `id` is not found
* value from `accessor`, or &hyphen;1 if `name` is not found

== Parameters

[cols="1,4"]
|===
| Name| Description
| *accessor*
| functor invoked on the selected attribute
| *id*
| attribute identifier to access
| *name*
| attribute name to access
| *nameLength*
| length of `name` in bytes
|===


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