BDE 4.14.0 Production release
Loading...
Searching...
No Matches
balxml::Encoder_SequenceFirstPass Class Reference

#include <balxml_encoder.h>

Public Member Functions

template<class TYPE >
int addAttributeImp (const TYPE &object, const bsl::string_view &name, int formattingMode, bdlat_TypeCategory::NullableValue)
 
template<class TYPE >
int addAttributeImp (const TYPE &object, const bsl::string_view &name, int formattingMode, bdlat_TypeCategory::DynamicType)
 
template<class TYPE , class ANY_CATEGORY >
int addAttributeImp (const TYPE &object, const bsl::string_view &name, int formattingMode, ANY_CATEGORY)
 
template<class TYPE >
int addAttribute (const TYPE &object, const bsl::string_view &name, int formattingMode)
 
 Encoder_SequenceFirstPass (Encoder_Context *context)
 Create a visitor for first pass for sequences.
 
template<class TYPE , class INFO_TYPE >
int operator() (const TYPE &object, const INFO_TYPE &info)
 Called back when an element is visited.
 
const bool & hasSubElements () const
 Return true if a sub-element is found, and false otherwise.
 
const bdlb::NullableValue< int > & simpleContentId () const
 

Detailed Description

Component private class. Do not use.

This class is used as the first pass when encoding elements of a sequence. It basically does two things: o encode elements with the bdlat_FormattingMode::e_IS_ATTRIBUTE flag using the Formatter::addAttribute method. o looks for an element with the bdlat_FormattingMode::e_IS_SIMPLE_CONTENT flag and, if found, provides accessors to obtain the id of the element. Note that the behavior is undefined unless there is only one element with IS_SIMPLE_CONTENT flag and, if this element exist, all other elements must have IS_ATTRIBUTE flag.

See balxml_encoder

Constructor & Destructor Documentation

◆ Encoder_SequenceFirstPass()

balxml::Encoder_SequenceFirstPass::Encoder_SequenceFirstPass ( Encoder_Context context)
inlineexplicit

Member Function Documentation

◆ addAttribute()

template<class TYPE >
int balxml::Encoder_SequenceFirstPass::addAttribute ( const TYPE &  object,
const bsl::string_view name,
int  formattingMode 
)
inline

Add an attribute with the specified name, the value of the specified object, using the specified formattingMode.

◆ addAttributeImp() [1/3]

template<class TYPE , class ANY_CATEGORY >
int balxml::Encoder_SequenceFirstPass::addAttributeImp ( const TYPE &  object,
const bsl::string_view name,
int  formattingMode,
ANY_CATEGORY   
)
inline

◆ addAttributeImp() [2/3]

template<class TYPE >
int balxml::Encoder_SequenceFirstPass::addAttributeImp ( const TYPE &  object,
const bsl::string_view name,
int  formattingMode,
bdlat_TypeCategory::DynamicType   
)
inline

◆ addAttributeImp() [3/3]

template<class TYPE >
int balxml::Encoder_SequenceFirstPass::addAttributeImp ( const TYPE &  object,
const bsl::string_view name,
int  formattingMode,
bdlat_TypeCategory::NullableValue   
)
inline

Add an attribute with the specified name, the value of the specified object, using the specified formattingMode. Note that the last argument is used for overloading purposes only.

◆ hasSubElements()

const bool & balxml::Encoder_SequenceFirstPass::hasSubElements ( ) const
inline

◆ operator()()

template<class TYPE , class INFO_TYPE >
int balxml::Encoder_SequenceFirstPass::operator() ( const TYPE &  object,
const INFO_TYPE &  info 
)

◆ simpleContentId()

const bdlb::NullableValue< int > & balxml::Encoder_SequenceFirstPass::simpleContentId ( ) const
inline

Return a null value if there is no element with IS_SIMPLE_CONTENT flag, or a non-null value with the integer id of the element otherwise.


The documentation for this class was generated from the following file: