namespace com::sun::star { namespace io { class XOutputStream; }
}
namespace oox {
/** Interface for binary output stream classes.
Thebinarydatainthestreamiswritteninlittle-endianformat.
*/ class BinaryOutputStream : publicvirtual BinaryStreamBase
{ public: /** Derived classes implement writing the contents of the passed data sequence.
/** Writes a value to the stream and converts it to platform byte order. AlldatatypessupportedbytheByteOrderConverterclasscanbeused.
*/ template< typename Type > void writeValue( Type nValue );
template< typename Type > void BinaryOutputStream::writeValue( Type nValue )
{
ByteOrderConverter::convertLittleEndian( nValue );
writeMemory( &nValue, static_cast< sal_Int32 >( sizeof( Type ) ), sizeof( Type ) );
}
/** Wraps a UNO output stream and provides convenient access functions.
Thebinarydatainthestreamiswritteninlittle-endianformat.
*/ class OOX_DLLPUBLIC BinaryXOutputStream final : public BinaryXSeekableStream, public BinaryOutputStream
{ public: /** Constructs the wrapper object for the passed output stream.
/** Flushes and closes the output stream. Does also close the wrapped UNO
output stream if bAutoClose has been set to true in the constructor. */ void close() override;
/** Writes the passed data sequence. */ virtualvoid writeData( const StreamDataSequence& rData, size_t nAtomSize = 1 ) override;
private:
StreamDataSequence maBuffer; ///< Data buffer used in writeMemory() function.
css::uno::Reference< css::io::XOutputStream >
mxOutStrm; ///< Reference to the output stream. bool mbAutoClose; ///< True = automatically close stream on destruction.
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.