[#BloombergLP-balber-BerEncoderOptions-accessAttribute-0d] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balber.adoc[balber]::xref:BloombergLP/balber/BerEncoderOptions.adoc[BerEncoderOptions]::accessAttribute :relfileprefix: ../../../ :mrdocs: `accessAttribute` overloads == Synopses Declared in `<balber_berencoderoptions.h>` Invoke the specified `accessor` on the attribute indicated by the specified `id`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename t_ACCESSOR> int xref:BloombergLP/balber/BerEncoderOptions/accessAttribute-0f.adoc[accessAttribute]( t_ACCESSOR& accessor, int id) const; ---- [.small]#xref:BloombergLP/balber/BerEncoderOptions/accessAttribute-0f.adoc[_» more..._]# Invoke the specified `accessor` on the attribute indicated by the specified `name` of the specified `nameLength`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<typename t_ACCESSOR> int xref:BloombergLP/balber/BerEncoderOptions/accessAttribute-02.adoc[accessAttribute]( t_ACCESSOR& accessor, char const* name, int nameLength) const; ---- [.small]#xref:BloombergLP/balber/BerEncoderOptions/accessAttribute-02.adoc[_» more..._]# == Return Value * value returned by `accessor`, or ‐1 if `id` is not found * value returned by `accessor`, or ‐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]#