BDE 4.14.0 Production release
|
#include <balxml_encoderoptions.h>
Public Member Functions | |
EncoderOptions (bslma::Allocator *basicAllocator=0) | |
EncoderOptions (const EncoderOptions &original, bslma::Allocator *basicAllocator=0) | |
~EncoderOptions () | |
Destroy this object. | |
EncoderOptions & | operator= (const EncoderOptions &rhs) |
Assign to this object the value of the specified rhs object. | |
void | reset () |
template<typename t_MANIPULATOR > | |
int | manipulateAttributes (t_MANIPULATOR &manipulator) |
template<typename t_MANIPULATOR > | |
int | manipulateAttribute (t_MANIPULATOR &manipulator, int id) |
template<typename t_MANIPULATOR > | |
int | manipulateAttribute (t_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) |
Set the "Tag" attribute of this object to the specified 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<typename t_ACCESSOR > | |
int | accessAttributes (t_ACCESSOR &accessor) const |
template<typename t_ACCESSOR > | |
int | accessAttribute (t_ACCESSOR &accessor, int id) const |
template<typename t_ACCESSOR > | |
int | accessAttribute (t_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 |
Return the value of the "FormattingMode" attribute of this object. | |
int | initialIndentLevel () const |
int | spacesPerLevel () const |
Return the value of the "SpacesPerLevel" attribute of this object. | |
int | wrapColumn () const |
Return the value of the "WrapColumn" attribute of this object. | |
const bdlb::NullableValue< int > & | maxDecimalTotalDigits () const |
const bdlb::NullableValue< int > & | maxDecimalFractionDigits () const |
const bdlb::NullableValue< int > & | significantDoubleDigits () const |
EncodingStyle::Value | encodingStyle () const |
Return the value of the "EncodingStyle" attribute of this object. | |
bool | allowControlCharacters () const |
bool | outputXMLHeader () const |
Return the value of the "OutputXMLHeader" attribute of this object. | |
bool | outputXSIAlias () const |
Return the value of the "OutputXSIAlias" attribute of this object. | |
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). The generated C++ code for this schema element is created by using bas_codegen.pl, run by balxml/code_from_xsd.pl, with no hand-editing.
anonymous enum |
anonymous enum |
|
explicit |
Create an object of type EncoderOptions
having the default value. Use the optionally specified basicAllocator
to supply memory. If basicAllocator
is 0, the currently installed default allocator is used.
balxml::EncoderOptions::EncoderOptions | ( | const EncoderOptions & | original, |
bslma::Allocator * | basicAllocator = 0 |
||
) |
Create an object of type EncoderOptions
having the value of the specified original
object. Use the optionally specified basicAllocator
to supply memory. If basicAllocator
is 0, the currently installed default allocator is used.
balxml::EncoderOptions::~EncoderOptions | ( | ) |
int balxml::EncoderOptions::accessAttribute | ( | t_ACCESSOR & | accessor, |
const char * | name, | ||
int | nameLength | ||
) | const |
Invoke the specified accessor
on the (non-modifiable) attribute of this object indicated by the specified name
of the specified nameLength
, supplying accessor
with the corresponding attribute information structure. Return the value returned from the invocation of accessor
if name
identifies an attribute of this class, and -1 otherwise.
int balxml::EncoderOptions::accessAttribute | ( | t_ACCESSOR & | accessor, |
int | id | ||
) | const |
Invoke the specified accessor
on the (non-modifiable) attribute of this object indicated by the specified id
, supplying accessor
with the corresponding attribute information structure. Return the value returned from the invocation of accessor
if id
identifies an attribute of this class, and -1 otherwise.
int balxml::EncoderOptions::accessAttributes | ( | t_ACCESSOR & | accessor | ) | const |
Invoke the specified accessor
sequentially on each (non-modifiable) attribute of this object, supplying accessor
with the corresponding attribute information structure until such invocation returns a non-zero value. Return the value from the last invocation of accessor
(i.e., the invocation that terminated the sequence).
|
inline |
Return the value of the "AllowControlCharacters" attribute of this object.
|
inline |
Return the value of the "DatetimeFractionalSecondPrecision" attribute of this object.
|
inline |
|
inline |
|
inline |
Return the value of the "InitialIndentLevel" attribute of this object.
|
static |
Return attribute information for the attribute indicated by the specified name
of the specified nameLength
if the attribute exists, and 0 otherwise.
|
static |
Return attribute information for the attribute indicated by the specified id
if the attribute exists, and 0 otherwise.
int balxml::EncoderOptions::manipulateAttribute | ( | t_MANIPULATOR & | manipulator, |
const char * | name, | ||
int | nameLength | ||
) |
Invoke the specified manipulator
on the address of the (modifiable) attribute indicated by the specified name
of the specified nameLength
, supplying manipulator
with the corresponding attribute information structure. Return the value returned from the invocation of manipulator
if name
identifies an attribute of this class, and -1 otherwise.
int balxml::EncoderOptions::manipulateAttribute | ( | t_MANIPULATOR & | manipulator, |
int | id | ||
) |
Invoke the specified manipulator
on the address of the (modifiable) attribute indicated by the specified id
, supplying manipulator
with the corresponding attribute information structure. Return the value returned from the invocation of manipulator
if id
identifies an attribute of this class, and -1 otherwise.
int balxml::EncoderOptions::manipulateAttributes | ( | t_MANIPULATOR & | manipulator | ) |
Invoke the specified manipulator
sequentially on the address of each (modifiable) attribute of this object, supplying manipulator
with the corresponding attribute information structure until such invocation returns a non-zero value. Return the value from the last invocation of manipulator
(i.e., the invocation that terminated the sequence).
|
inline |
Return a reference offering non-modifiable access to the "MaxDecimalFractionDigits" attribute of this object.
|
inline |
Return a reference offering non-modifiable access to the "MaxDecimalTotalDigits" attribute of this object.
|
inline |
Return a reference offering non-modifiable access to the "ObjectNamespace" attribute of this object.
EncoderOptions & balxml::EncoderOptions::operator= | ( | const EncoderOptions & | rhs | ) |
|
inline |
|
inline |
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.
void balxml::EncoderOptions::reset | ( | ) |
Reset this object to the default value (i.e., its value upon default construction).
|
inline |
Return a reference offering non-modifiable access to the "SchemaLocation" attribute of this object.
|
inline |
Set the "AllowControlCharacters" attribute of this object to the specified value
.
|
inline |
Set the "DatetimeFractionalSecondPrecision" attribute of this object to the specified value
.
|
inline |
Set the "EncodingStyle" attribute of this object to the specified value
.
|
inline |
Set the "FormattingMode" attribute of this object to the specified value
.
|
inline |
Set the "InitialIndentLevel" attribute of this object to the specified value
.
|
inline |
Set the "MaxDecimalFractionDigits" attribute of this object to the specified value
.
|
inline |
Set the "MaxDecimalTotalDigits" attribute of this object to the specified value
.
|
inline |
Set the "ObjectNamespace" attribute of this object to the specified value
.
|
inline |
Set the "OutputXMLHeader" attribute of this object to the specified value
.
|
inline |
Set the "OutputXSIAlias" attribute of this object to the specified value
.
|
inline |
Set the "SchemaLocation" attribute of this object to the specified value
.
|
inline |
Set the "SignificantDoubleDigits" attribute of this object to the specified value
.
|
inline |
Set the "SpacesPerLevel" attribute of this object to the specified value
.
|
inline |
|
inline |
Set the "UseZAbbreviationForUtc" attribute of this object to the specified value
.
|
inline |
Set the "WrapColumn" attribute of this object to the specified value
.
|
inline |
Return a reference offering non-modifiable access to the "SignificantDoubleDigits" attribute of this object.
|
inline |
|
inline |
Return a reference offering non-modifiable access to the "Tag" attribute of this object.
|
inline |
Return the value of the "UseZAbbreviationForUtc" attribute of this object.
|
inline |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |