BloombergLP::baljsn::EncodeImplUtil_AttributeVisitor

This component-private class provides a function object used to encode sequence attributes that satisfy one of the bdlat type-category concepts.

Synopsis

Declared in <baljsn_encodeimplutil.h>

template<class FORMATTER>
class EncodeImplUtil_AttributeVisitor;

Description

This class's constructor closes over the formatter, logStream, and options parameters that are shared between all encoding operations provided in this component. The function-call operator of this class provides an overload set that accepts an "attribute" object that satisfies one of the bdlat type-category concepts, and an "attribute info" object that describes various metadata of the attribute.

Type Aliases

NameDescription
FormattingMode Alias for an int-valued bdlat_FormattingMode bit-field.

Member Functions

NameDescription
EncodeImplUtil_AttributeVisitor [constructor]Construct an EncodeImplUtil_AttributeVisitor object having the specified formatter, logStream, isNextAttributeFirst, and options attributes.
isNextAttributeFirst Return the value of the isNextAttributeFirst attribute of this object.
operator() Encode the JSON representation of attribute using attributeInfo.