[#BloombergLP-balxml-EncoderOptions-accessAttribute-03]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/EncoderOptions.adoc[EncoderOptions]::accessAttribute
:relfileprefix: ../../../
:mrdocs:

`accessAttribute` overloads

== Synopses

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

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename t&lowbar;ACCESSOR&gt;
int
xref:BloombergLP/balxml/EncoderOptions/accessAttribute-09.adoc[accessAttribute](
    t&lowbar;ACCESSOR& accessor,
    int id) const;
----

[.small]#xref:BloombergLP/balxml/EncoderOptions/accessAttribute-09.adoc[_» more&period;&period;&period;_]#

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


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;typename t&lowbar;ACCESSOR&gt;
int
xref:BloombergLP/balxml/EncoderOptions/accessAttribute-0e.adoc[accessAttribute](
    t&lowbar;ACCESSOR& accessor,
    char const* name,
    int nameLength) const;
----

[.small]#xref:BloombergLP/balxml/EncoderOptions/accessAttribute-0e.adoc[_» more&period;&period;&period;_]#

== Return Value

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

== Parameters

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


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