BloombergLP::baljsn::EncoderOptions::accessAttribute

accessAttribute overloads

Synopses

Declared in <baljsn_encoderoptions.h>

Invoke accessor on the non-modifiable attribute indicated by id.

template<class ACCESSOR>
int
accessAttribute(
    ACCESSOR& accessor,
    int id) const;
» more...

Invoke accessor on the non-modifiable attribute indicated by name.

template<class ACCESSOR>
int
accessAttribute(
    ACCESSOR& accessor,
    char const* name,
    int nameLength) const;
» 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

NameDescription
accessorfunctor invoked on the matching attribute
idattribute id
nameattribute name
nameLengthlength of name