accessAttribute overloads

Synopses

Declared in <bdlat_sequencefunctions.h>

Invoke an accessor on a sequence attribute identified by id.

template<
    class TYPE,
    class ACCESSOR>
int
accessAttribute(
    TYPE const& object,
    ACCESSOR& accessor,
    int attributeId);

Invoke an accessor on a sequence attribute identified by name.

template<
    class TYPE,
    class ACCESSOR>
int
accessAttribute(
    TYPE const& object,
    ACCESSOR& accessor,
    char const* attributeName,
    int attributeNameLength);

Return Value

non‐zero if the attribute is not found, and the value from accessor otherwise

Parameters

Name

Description

object

sequence whose attribute is accessed

accessor

callable invoked with the attribute and its info

attributeId

id of the attribute to access

attributeName

name of the attribute to access

attributeNameLength

length of attributeName

Created with MrDocs