BloombergLP::balxml::Encoder::encodeAny

encodeAny overloads

Synopses

Declared in <balxml_encoder.h>

Encode the specified object without instantiating templates at compile time.

int
encodeAny(
    Formatter& formatter,
    bdlar::AnyConstRef const& object);
» more...

Encode the specified object to the specified stream without instantiating encoding templates at compile time.

std::ostream&
encodeAny(
    std::ostream& stream,
    bdlar::AnyConstRef const& object);
» more...

Encode the specified object to the specified buffer without instantiating encoding templates at compile time.

int
encodeAny(
    std::streambuf* buffer,
    bdlar::AnyConstRef const& object);
» more...

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

template<class TYPE>
int
encodeAny(
    Formatter& formatter,
    TYPE const& object);
» more...

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

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

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

template<class TYPE>
int
encodeAny(
    std::streambuf* buffer,
    TYPE const& object);
» more...

Return Value

  • 0 on success, and a non-zero value otherwise
  • a reference to the modifiable stream

Parameters

NameDescription
formatterXML formatter to receive the encoded value
objecttype-erased value to encode
streamoutput stream to receive XML
bufferoutput stream buffer to receive XML