[#BloombergLP-baljsn-EncoderOptions-manipulateAttribute-0e]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/baljsn.adoc[baljsn]::xref:BloombergLP/baljsn/EncoderOptions.adoc[EncoderOptions]::manipulateAttribute
:relfileprefix: ../../../
:mrdocs:

Invoke `manipulator` on the modifiable attribute indicated by name&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class MANIPULATOR&gt;
int
manipulateAttribute(
    MANIPULATOR& manipulator,
    char const* name,
    int nameLength);
----

== Description

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

== Return Value

value returned by `manipulator`, or &hyphen;1 if `name` is not found

== Parameters

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


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