Public Types |
enum | {
ATTRIBUTE_ID_OBJECT_NAMESPACE = 0,
ATTRIBUTE_ID_SCHEMA_LOCATION = 1,
ATTRIBUTE_ID_TAG = 2,
ATTRIBUTE_ID_FORMATTING_MODE = 3,
ATTRIBUTE_ID_INITIAL_INDENT_LEVEL = 4,
ATTRIBUTE_ID_SPACES_PER_LEVEL = 5,
ATTRIBUTE_ID_WRAP_COLUMN = 6,
ATTRIBUTE_ID_MAX_DECIMAL_TOTAL_DIGITS = 7,
ATTRIBUTE_ID_MAX_DECIMAL_FRACTION_DIGITS = 8,
ATTRIBUTE_ID_SIGNIFICANT_DOUBLE_DIGITS = 9,
ATTRIBUTE_ID_ENCODING_STYLE = 10,
ATTRIBUTE_ID_ALLOW_CONTROL_CHARACTERS = 11,
ATTRIBUTE_ID_OUTPUT_X_M_L_HEADER = 12,
ATTRIBUTE_ID_OUTPUT_X_S_I_ALIAS = 13,
ATTRIBUTE_ID_DATETIME_FRACTIONAL_SECOND_PRECISION = 14,
ATTRIBUTE_ID_USE_Z_ABBREVIATION_FOR_UTC = 15
} |
enum | { NUM_ATTRIBUTES = 16
} |
enum | {
ATTRIBUTE_INDEX_OBJECT_NAMESPACE = 0,
ATTRIBUTE_INDEX_SCHEMA_LOCATION = 1,
ATTRIBUTE_INDEX_TAG = 2,
ATTRIBUTE_INDEX_FORMATTING_MODE = 3,
ATTRIBUTE_INDEX_INITIAL_INDENT_LEVEL = 4,
ATTRIBUTE_INDEX_SPACES_PER_LEVEL = 5,
ATTRIBUTE_INDEX_WRAP_COLUMN = 6,
ATTRIBUTE_INDEX_MAX_DECIMAL_TOTAL_DIGITS = 7,
ATTRIBUTE_INDEX_MAX_DECIMAL_FRACTION_DIGITS = 8,
ATTRIBUTE_INDEX_SIGNIFICANT_DOUBLE_DIGITS = 9,
ATTRIBUTE_INDEX_ENCODING_STYLE = 10,
ATTRIBUTE_INDEX_ALLOW_CONTROL_CHARACTERS = 11,
ATTRIBUTE_INDEX_OUTPUT_X_M_L_HEADER = 12,
ATTRIBUTE_INDEX_OUTPUT_X_S_I_ALIAS = 13,
ATTRIBUTE_INDEX_DATETIME_FRACTIONAL_SECOND_PRECISION = 14,
ATTRIBUTE_INDEX_USE_Z_ABBREVIATION_FOR_UTC = 15
} |
Public Member Functions |
| EncoderOptions (bslma::Allocator *basicAllocator=0) |
| EncoderOptions (const EncoderOptions &original, bslma::Allocator *basicAllocator=0) |
| ~EncoderOptions () |
EncoderOptions & | operator= (const EncoderOptions &rhs) |
void | reset () |
template<class MANIPULATOR > |
int | manipulateAttributes (MANIPULATOR &manipulator) |
template<class MANIPULATOR > |
int | manipulateAttribute (MANIPULATOR &manipulator, int id) |
template<class MANIPULATOR > |
int | manipulateAttribute (MANIPULATOR &manipulator, const char *name, int nameLength) |
void | setObjectNamespace (const bsl::string_view &value) |
void | setSchemaLocation (const bsl::string_view &value) |
void | setTag (const bsl::string_view &value) |
void | setFormattingMode (int value) |
void | setInitialIndentLevel (int value) |
void | setSpacesPerLevel (int value) |
void | setWrapColumn (int value) |
void | setMaxDecimalTotalDigits (const bdlb::NullableValue< int > &value) |
void | setMaxDecimalFractionDigits (const bdlb::NullableValue< int > &value) |
void | setSignificantDoubleDigits (const bdlb::NullableValue< int > &value) |
void | setEncodingStyle (EncodingStyle::Value value) |
void | setAllowControlCharacters (bool value) |
void | setOutputXMLHeader (bool value) |
void | setOutputXSIAlias (bool value) |
void | setDatetimeFractionalSecondPrecision (int value) |
void | setUseZAbbreviationForUtc (bool value) |
bsl::ostream & | print (bsl::ostream &stream, int level=0, int spacesPerLevel=4) const |
template<class ACCESSOR > |
int | accessAttributes (ACCESSOR &accessor) const |
template<class ACCESSOR > |
int | accessAttribute (ACCESSOR &accessor, int id) const |
template<class ACCESSOR > |
int | accessAttribute (ACCESSOR &accessor, const char *name, int nameLength) const |
const bsl::string & | objectNamespace () const |
const bsl::string & | schemaLocation () const |
const bsl::string & | tag () const |
int | formattingMode () const |
int | initialIndentLevel () const |
int | spacesPerLevel () const |
int | wrapColumn () const |
const bdlb::NullableValue< int > & | maxDecimalTotalDigits () const |
const bdlb::NullableValue< int > & | maxDecimalFractionDigits () const |
const bdlb::NullableValue< int > & | significantDoubleDigits () const |
EncodingStyle::Value | encodingStyle () const |
bool | allowControlCharacters () const |
bool | outputXMLHeader () const |
bool | outputXSIAlias () const |
int | datetimeFractionalSecondPrecision () const |
bool | useZAbbreviationForUtc () const |
Static Public Member Functions |
static const bdlat_AttributeInfo * | lookupAttributeInfo (int id) |
static const bdlat_AttributeInfo * | lookupAttributeInfo (const char *name, int nameLength) |
Static Public Attributes |
static const char | CLASS_NAME [] |
static const int | DEFAULT_INITIALIZER_FORMATTING_MODE |
static const int | DEFAULT_INITIALIZER_INITIAL_INDENT_LEVEL |
static const int | DEFAULT_INITIALIZER_SPACES_PER_LEVEL |
static const int | DEFAULT_INITIALIZER_WRAP_COLUMN |
static const EncodingStyle::Value | DEFAULT_INITIALIZER_ENCODING_STYLE |
static const bool | DEFAULT_INITIALIZER_ALLOW_CONTROL_CHARACTERS |
static const bool | DEFAULT_INITIALIZER_OUTPUT_X_M_L_HEADER |
static const bool | DEFAULT_INITIALIZER_OUTPUT_X_S_I_ALIAS |
static const int | DEFAULT_INITIALIZER_DATETIME_FRACTIONAL_SECOND_PRECISION |
static const bool | DEFAULT_INITIALIZER_USE_Z_ABBREVIATION_FOR_UTC |
static const bdlat_AttributeInfo | ATTRIBUTE_INFO_ARRAY [] |
Options for performing XML encodings. Encoding style is either COMPACT or PRETTY. If encoding style is COMPACT, no whitespace will be added between elements. If encoding style is PRETTY
, then the InitialIndentLevel
, SpacesPerLevel
, and WrapColumn
parameters are used to specify the formatting of the output. Note that InitialIndentLevel
, SpacesPerLevel
, and WrapColumn
are ignored when EncodingStyle
is COMPACT (this is the default). This struct is generated using bas_codegen.pl called by balxml/code_from_xsd.pl
bsl::ostream& balxml::EncoderOptions::print |
( |
bsl::ostream & |
stream, |
|
|
int |
level = 0 , |
|
|
int |
spacesPerLevel = 4 | |
|
) |
| | const |
Format this object to the specified output stream
at the optionally specified indentation level
and return a reference to the modifiable stream
. If level
is specified, optionally specify spacesPerLevel
, the number of spaces per indentation level for this and all of its nested objects. Each line is indented by the absolute value of level * spacesPerLevel
. If level
is negative, suppress indentation of the first line. If spacesPerLevel
is negative, suppress line breaks and format the entire output on one line. If stream
is initially invalid, this operation has no effect. Note that a trailing newline is provided in multiline mode only.