BloombergLP::balxml::Encoder::encodeAny

Encode the specified non-modifiable object to the specified stream.

Synopsis

Declared in <balxml_encoder.h>

template<class TYPE>
std::ostream&
encodeAny(
    std::ostream& stream,
    TYPE const& object);

Description

Return a reference to stream. If an encoding error is detected, stream.fail() will be true on return. Note that the encoder will use encoder options, error and warning streams specified at the construction time. Also note that this function behaves identically to encode, but does not instantiate any templates at compile time at the expense of being slightly slower at runtime; see the balxml package documentation for more details.

Return Value

a reference to the modifiable stream

Parameters

NameDescription
streamoutput stream to receive XML
objectvalue to encode