Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
Poco::BasicMemoryBinaryWriter< T > Class Template Reference

A convenient wrapper for using Buffer and MemoryStream with BinarWriter. More...

#include <BinaryWriter.h>

+ Inheritance diagram for Poco::BasicMemoryBinaryWriter< T >:
+ Collaboration diagram for Poco::BasicMemoryBinaryWriter< T >:

Public Member Functions

 BasicMemoryBinaryWriter (Buffer< T > &data, StreamByteOrder byteOrder=NATIVE_BYTE_ORDER)
 
 BasicMemoryBinaryWriter (Buffer< T > &data, TextEncoding &encoding, StreamByteOrder byteOrder=NATIVE_BYTE_ORDER)
 
 ~BasicMemoryBinaryWriter ()
 
Buffer< T > & data ()
 
const Buffer< T > & data () const
 
const MemoryOutputStreamstream () const
 
MemoryOutputStreamstream ()
 
- Public Member Functions inherited from Poco::BinaryWriter
 BinaryWriter (std::ostream &ostr, StreamByteOrder byteOrder=NATIVE_BYTE_ORDER)
 
 BinaryWriter (std::ostream &ostr, TextEncoding &encoding, StreamByteOrder byteOrder=NATIVE_BYTE_ORDER)
 Creates the BinaryWriter.
 
 ~BinaryWriter ()
 
BinaryWriteroperator<< (bool value)
 Destroys the BinaryWriter.
 
BinaryWriteroperator<< (char value)
 
BinaryWriteroperator<< (unsigned char value)
 
BinaryWriteroperator<< (signed char value)
 
BinaryWriteroperator<< (short value)
 
BinaryWriteroperator<< (unsigned short value)
 
BinaryWriteroperator<< (int value)
 
BinaryWriteroperator<< (unsigned int value)
 
BinaryWriteroperator<< (long value)
 
BinaryWriteroperator<< (unsigned long value)
 
BinaryWriteroperator<< (float value)
 
BinaryWriteroperator<< (double value)
 
BinaryWriteroperator<< (const std::string &value)
 
BinaryWriteroperator<< (const char *value)
 
template<typename T >
BinaryWriteroperator<< (const std::vector< T > &value)
 
void write7BitEncoded (UInt32 value)
 
void writeRaw (const std::string &rawData)
 
void writeRaw (const char *buffer, std::streamsize length)
 Writes the string as-is to the stream.
 
void writeBOM ()
 Writes length raw bytes from the given buffer to the stream.
 
void flush ()
 
bool good ()
 Flushes the underlying stream.
 
bool fail ()
 Returns _ostr.good();.
 
bool bad ()
 Returns _ostr.fail();.
 
std::ostream & stream () const
 Returns _ostr.bad();.
 
StreamByteOrder byteOrder () const
 Returns the underlying stream.
 

Private Attributes

Buffer< T > & _data
 
MemoryOutputStream _ostr
 

Additional Inherited Members

- Public Types inherited from Poco::BinaryWriter
enum  StreamByteOrder { NATIVE_BYTE_ORDER = 1 , BIG_ENDIAN_BYTE_ORDER = 2 , NETWORK_BYTE_ORDER = 2 , LITTLE_ENDIAN_BYTE_ORDER = 3 }
 

Detailed Description

template<typename T>
class Poco::BasicMemoryBinaryWriter< T >

A convenient wrapper for using Buffer and MemoryStream with BinarWriter.

Definition at line 168 of file BinaryWriter.h.

Constructor & Destructor Documentation

◆ BasicMemoryBinaryWriter() [1/2]

template<typename T >
Poco::BasicMemoryBinaryWriter< T >::BasicMemoryBinaryWriter ( Buffer< T > & data,
StreamByteOrder byteOrder = NATIVE_BYTE_ORDER )
inline

Definition at line 172 of file BinaryWriter.h.

◆ BasicMemoryBinaryWriter() [2/2]

template<typename T >
Poco::BasicMemoryBinaryWriter< T >::BasicMemoryBinaryWriter ( Buffer< T > & data,
TextEncoding & encoding,
StreamByteOrder byteOrder = NATIVE_BYTE_ORDER )
inline

Definition at line 179 of file BinaryWriter.h.

◆ ~BasicMemoryBinaryWriter()

template<typename T >
Poco::BasicMemoryBinaryWriter< T >::~BasicMemoryBinaryWriter ( )
inline

Definition at line 186 of file BinaryWriter.h.

Member Function Documentation

◆ data() [1/2]

template<typename T >
Buffer< T > & Poco::BasicMemoryBinaryWriter< T >::data ( )
inline

Definition at line 198 of file BinaryWriter.h.

◆ data() [2/2]

template<typename T >
const Buffer< T > & Poco::BasicMemoryBinaryWriter< T >::data ( ) const
inline

Definition at line 203 of file BinaryWriter.h.

◆ stream() [1/2]

template<typename T >
MemoryOutputStream & Poco::BasicMemoryBinaryWriter< T >::stream ( )
inline

Definition at line 213 of file BinaryWriter.h.

◆ stream() [2/2]

template<typename T >
const MemoryOutputStream & Poco::BasicMemoryBinaryWriter< T >::stream ( ) const
inline

Definition at line 208 of file BinaryWriter.h.

Member Data Documentation

◆ _data

template<typename T >
Buffer<T>& Poco::BasicMemoryBinaryWriter< T >::_data
private

Definition at line 219 of file BinaryWriter.h.

◆ _ostr

template<typename T >
MemoryOutputStream Poco::BasicMemoryBinaryWriter< T >::_ostr
private

Definition at line 220 of file BinaryWriter.h.


The documentation for this class was generated from the following file: