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

#include <balxml_encoder.h>

Public Member Functions

 Encoder_Context (Formatter *formatter, Encoder *encoder)
 
template<class NAME_TYPE , class VALUE_TYPE >
void addAttribute (const NAME_TYPE &name, const VALUE_TYPE &value)
 
template<class NAME_TYPE , class VALUE_TYPE >
void addAttribute (const NAME_TYPE &name, const VALUE_TYPE &value, int formattingMode)
 
template<class NAME_TYPE >
void closeElement (const NAME_TYPE &name)
 
void invalidate ()
 
ErrorInfo::Severity logError (const char *text, const bsl::string_view &tag, int formattingMode, int index=-1)
 
template<class NAME_TYPE >
void openElement (const NAME_TYPE &name)
 
bsl::ostream & rawOutputStream ()
 
const EncoderOptionsencoderOptions () const
 
int status () const
 

Detailed Description

This struct contains state that is maintained during encoding. It also contains methods for switching between pretty formatting and compact formatting, based on the encoding options.

See balxml_encoder

Constructor & Destructor Documentation

◆ Encoder_Context()

balxml::Encoder_Context::Encoder_Context ( Formatter formatter,
Encoder encoder 
)

Member Function Documentation

◆ addAttribute() [1/2]

template<class NAME_TYPE , class VALUE_TYPE >
void balxml::Encoder_Context::addAttribute ( const NAME_TYPE &  name,
const VALUE_TYPE &  value 
)
inline

◆ addAttribute() [2/2]

template<class NAME_TYPE , class VALUE_TYPE >
void balxml::Encoder_Context::addAttribute ( const NAME_TYPE &  name,
const VALUE_TYPE &  value,
int  formattingMode 
)
inline

◆ closeElement()

template<class NAME_TYPE >
void balxml::Encoder_Context::closeElement ( const NAME_TYPE &  name)
inline

◆ encoderOptions()

const EncoderOptions & balxml::Encoder_Context::encoderOptions ( ) const
inline

◆ invalidate()

void balxml::Encoder_Context::invalidate ( )
inline

◆ logError()

ErrorInfo::Severity balxml::Encoder_Context::logError ( const char *  text,
const bsl::string_view tag,
int  formattingMode,
int  index = -1 
)
inline

◆ openElement()

template<class NAME_TYPE >
void balxml::Encoder_Context::openElement ( const NAME_TYPE &  name)
inline

◆ rawOutputStream()

bsl::ostream & balxml::Encoder_Context::rawOutputStream ( )
inline

◆ status()

int balxml::Encoder_Context::status ( ) const
inline

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