MAK RTIspy API Documentation for HLA 1.3
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes
DtMsgCompressor Class Reference

The DtMsgCompressor class provides a means for compressing and uncompressing messages. More...

+ Collaboration diagram for DtMsgCompressor:

Public Member Functions

 DtMsgCompressor (DtBoost::shared_ptr< DtMsgHeaderReader > hdrReader, size_t maxUncompressedMsgSize, MAKRti::DtU8 compressionLevel=1)
 Constructor. More...
 
virtual ~DtMsgCompressor ()
 Destructor. More...
 
virtual bool compressMsg (char *msg, size_t msgSize, char **compressedMsg, size_t &compressedSize)
 Compresses the message. More...
 
virtual bool isCompressed (const char *bufferPtr, size_t size) const
 Returns true if the given message is compressed. More...
 
virtual bool uncompressMsg (char *msg, size_t msgSize, char **uncompressedMsg, size_t &uncompressedSize)
 Uncompresses the message. More...
 
virtual MAKRti::DtU8 compressionLevel () const
 Get/Set the compression level. More...
 
virtual void setCompressionLevel (MAKRti::DtU8 level)
 
virtual size_t maxUncompressedMsgSize () const
 Get the maximum size of uncompressed messages. More...
 

Protected Attributes

std::vector< char > myCompressedBuffer
 Buffer for storing outgoing messages after they have been compressed. More...
 
std::vector< char > myUncompressedBuffer
 Buffer for storing incoming messages after they have been uncompressed. More...
 
size_t myUncompressedDataSize
 Size of the data in the uncompressed buffer. More...
 
DtBoost::shared_ptr
< DtMsgHeaderReader
myHeaderReader
 Reads data from message header. More...
 
MAKRti::DtU8 myCompressionLevel
 The compression level. More...
 
size_t myMaxUncompressedMsgSize
 The maximum size of uncompressed messages. More...
 
z_streamp myCompressionStream
 Pointer to ZLIB stream structure used for compression. More...
 
z_streamp myUncompressionStream
 Pointer to ZLIB stream structure used for decompression. More...
 

Detailed Description

The DtMsgCompressor class provides a means for compressing and uncompressing messages.

Constructor & Destructor Documentation

DtMsgCompressor::DtMsgCompressor ( DtBoost::shared_ptr< DtMsgHeaderReader hdrReader,
size_t  maxUncompressedMsgSize,
MAKRti::DtU8  compressionLevel = 1 
)

Constructor.

virtual DtMsgCompressor::~DtMsgCompressor ( )
virtual

Destructor.

Member Function Documentation

virtual MAKRti::DtU8 DtMsgCompressor::compressionLevel ( ) const
inlinevirtual

Get/Set the compression level.

virtual bool DtMsgCompressor::compressMsg ( char *  msg,
size_t  msgSize,
char **  compressedMsg,
size_t &  compressedSize 
)
virtual

Compresses the message.

Returns true if the message was compressed. Fills in the location and size of the compressed message if the message is successfully compressed.

virtual bool DtMsgCompressor::isCompressed ( const char *  bufferPtr,
size_t  size 
) const
virtual

Returns true if the given message is compressed.

virtual size_t DtMsgCompressor::maxUncompressedMsgSize ( ) const
inlinevirtual

Get the maximum size of uncompressed messages.

Used for internal buffer sizes.

virtual void DtMsgCompressor::setCompressionLevel ( MAKRti::DtU8  level)
virtual
virtual bool DtMsgCompressor::uncompressMsg ( char *  msg,
size_t  msgSize,
char **  uncompressedMsg,
size_t &  uncompressedSize 
)
virtual

Uncompresses the message.

Returns true if the message was uncompressed. Fills in the location and size of the uncompressed message if a full message is successfully uncompressed.

Member Data Documentation

std::vector<char> DtMsgCompressor::myCompressedBuffer
protected

Buffer for storing outgoing messages after they have been compressed.

MAKRti::DtU8 DtMsgCompressor::myCompressionLevel
protected

The compression level.

z_streamp DtMsgCompressor::myCompressionStream
protected

Pointer to ZLIB stream structure used for compression.

DtBoost::shared_ptr<DtMsgHeaderReader> DtMsgCompressor::myHeaderReader
protected

Reads data from message header.

size_t DtMsgCompressor::myMaxUncompressedMsgSize
protected

The maximum size of uncompressed messages.

std::vector<char> DtMsgCompressor::myUncompressedBuffer
protected

Buffer for storing incoming messages after they have been uncompressed.

size_t DtMsgCompressor::myUncompressedDataSize
protected

Size of the data in the uncompressed buffer.

z_streamp DtMsgCompressor::myUncompressionStream
protected

Pointer to ZLIB stream structure used for decompression.


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

Document ID: Generated on Mon Sep 7 15:40:32 EDT 2020 from SVN revision 217499
Copyright © 2005-2020 MAK Technologies Inc. All Rights Reserved (www.mak.com)