Visualization Library 2.0.0-b5

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Member Functions | Protected Attributes | Properties | Events | List of all members
DotZLib.CodecBase Class Referenceabstract

Implements the common functionality needed for all Codecs More...

+ Inheritance diagram for DotZLib.CodecBase:

Public Member Functions

 CodecBase ()
 Initializes a new instance of the CodeBase class. More...
 
void Add (byte[] data)
 Adds more data to the codec to be processed. More...
 
abstract void Add (byte[] data, int offset, int count)
 Adds more data to the codec to be processed. More...
 
abstract void Finish ()
 Finishes up any pending data that needs to be processed and handled. More...
 
void Dispose ()
 Releases any unmanaged resources and calls the CleanUp() method of the derived class More...
 

Protected Member Functions

void OnDataAvailable ()
 Fires the DataAvailable event More...
 
abstract void CleanUp ()
 Performs any codec specific cleanup More...
 
void copyInput (byte[] data, int startIndex, int count)
 Copies a number of bytes to the internal codec buffer - ready for proccesing More...
 
void resetOutput ()
 Resets the internal output buffers to a known state - ready for processing More...
 
void setChecksum (uint newSum)
 Updates the running checksum property More...
 

Protected Attributes

bool _isDisposed = false
 True if the object instance has been disposed, false otherwise More...
 
const int kBufferSize = 16384
 The size of the internal buffers More...
 

Properties

uint Checksum [get]
 Gets the checksum of the data that has been added so far More...
 
- Properties inherited from DotZLib.Codec
uint Checksum [get]
 Gets the checksum of the data that has been added so far More...
 

Events

DataAvailableHandler DataAvailable
 Occurs when more processed data are available. More...
 
- Events inherited from DotZLib.Codec
DataAvailableHandler DataAvailable
 Occurs when more processed data are available. More...
 

Detailed Description

Implements the common functionality needed for all Codecs

Definition at line 16 of file CodecBase.cs.

Constructor & Destructor Documentation

◆ CodecBase()

DotZLib.CodecBase.CodecBase ( )
inline

Initializes a new instance of the CodeBase class.

Definition at line 50 of file CodecBase.cs.

References DotZLib.CodecBase.CleanUp().

Member Function Documentation

◆ Add() [1/2]

void DotZLib.CodecBase.Add ( byte []  data)
inline

Adds more data to the codec to be processed.

Parameters
dataByte array containing the data to be added to the codec

Adding data may, or may not, raise the DataAvailable event

Implements DotZLib.Codec.

Definition at line 90 of file CodecBase.cs.

References DotZLib.CodecBase.Finish().

◆ Add() [2/2]

abstract void DotZLib.CodecBase.Add ( byte []  data,
int  offset,
int  count 
)
pure virtual

Adds more data to the codec to be processed.

Parameters
dataByte array containing the data to be added to the codec
offsetThe index of the first byte to add from data
countThe number of bytes to add

Adding data may, or may not, raise the DataAvailable event

This must be implemented by a derived class

Implements DotZLib.Codec.

Implemented in DotZLib.Deflater, and DotZLib.Inflater.

◆ CleanUp()

abstract void DotZLib.CodecBase.CleanUp ( )
protectedpure virtual

Performs any codec specific cleanup

This must be implemented by a derived class

Implemented in DotZLib.Deflater, and DotZLib.Inflater.

Referenced by DotZLib.CodecBase.CodecBase(), and DotZLib.CodecBase.Dispose().

◆ copyInput()

void DotZLib.CodecBase.copyInput ( byte []  data,
int  startIndex,
int  count 
)
inlineprotected

Copies a number of bytes to the internal codec buffer - ready for proccesing

Parameters
dataThe byte array that contains the data to copy
startIndexThe index of the first byte to copy
countThe number of bytes to copy from data

Definition at line 168 of file CodecBase.cs.

Referenced by DotZLib.Deflater.Add(), and DotZLib.Inflater.Add().

◆ Dispose()

void DotZLib.CodecBase.Dispose ( )
inline

Releases any unmanaged resources and calls the CleanUp() method of the derived class

Definition at line 131 of file CodecBase.cs.

References DotZLib.CodecBase.CleanUp().

◆ Finish()

abstract void DotZLib.CodecBase.Finish ( )
pure virtual

Finishes up any pending data that needs to be processed and handled.

This must be implemented by a derived class

Implements DotZLib.Codec.

Implemented in DotZLib.Deflater, and DotZLib.Inflater.

Referenced by DotZLib.CodecBase.Add().

◆ OnDataAvailable()

void DotZLib.CodecBase.OnDataAvailable ( )
inlineprotected

◆ resetOutput()

void DotZLib.CodecBase.resetOutput ( )
inlineprotected

Resets the internal output buffers to a known state - ready for processing

Definition at line 180 of file CodecBase.cs.

References DotZLib.CodecBase.kBufferSize.

Referenced by DotZLib.Deflater.Deflater(), DotZLib.Inflater.Finish(), DotZLib.Deflater.Finish(), DotZLib.Inflater.Inflater(), and DotZLib.CodecBase.OnDataAvailable().

◆ setChecksum()

void DotZLib.CodecBase.setChecksum ( uint  newSum)
inlineprotected

Updates the running checksum property

Parameters
newSumThe new checksum value

Definition at line 191 of file CodecBase.cs.

Referenced by DotZLib.Deflater.Add(), DotZLib.Inflater.Add(), DotZLib.Inflater.Finish(), and DotZLib.Deflater.Finish().

Member Data Documentation

◆ _isDisposed

bool DotZLib.CodecBase._isDisposed = false
protected

True if the object instance has been disposed, false otherwise

Definition at line 30 of file CodecBase.cs.

◆ kBufferSize

const int DotZLib.CodecBase.kBufferSize = 16384
protected

The size of the internal buffers

Definition at line 35 of file CodecBase.cs.

Referenced by DotZLib.Deflater.Add(), DotZLib.Inflater.Add(), and DotZLib.CodecBase.resetOutput().

Property Documentation

◆ Checksum

uint DotZLib.CodecBase.Checksum
get

Gets the checksum of the data that has been added so far

Definition at line 114 of file CodecBase.cs.

Event Documentation

◆ DataAvailable

DataAvailableHandler DotZLib.CodecBase.DataAvailable

Occurs when more processed data are available.

Definition at line 70 of file CodecBase.cs.

Referenced by DotZLib.CodecBase.OnDataAvailable().


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