Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

ContextBase Class Reference

Abstract predecessor for all context classes used in arithmetic coding/decoding. More...

#include <contextbase.h>

Inheritance diagram for ContextBase:

Context List of all members.

Public Types

enum  OperationResult { Ok = 0, NotKnown = -1, TooManySymbols = -2, NoMemory = -3 }
 An enum with results of some contex operations. More...


Public Methods

 ContextBase (void)
 A constructor.

virtual void setType (int, ContextType)=0
 Initialization of the context with given size and type.

virtual int initialize (void)=0
 Initialize context.

virtual int lastFixedSymbol (void)=0
 Return the value of last fixed symbol in the context.

virtual bool isInitialized (void)
 Initialize context.

virtual void setArithCodec (ArithCodec *ac)
 Set arithmetic coder for the context.

virtual int encode (int)=0 throw (ExaltContextNotInitializedException, ExaltIOException)
 Encode symbol using given arithmetic coder/decoder.

virtual int encodeEndOfMessage ()=0 throw (ExaltContextNotInitializedException, ExaltIOException)
 Encode the "end of message" symbol.

virtual int decode (void)=0 throw (ExaltContextNotInitializedException, ExaltIOException)
 Decode symbol using given arithmetic coder/decoder.

virtual int installSymbol (int)=0
 Install new symbol.

virtual void purgeContext (void)=0
 Purge the context.


Public Attributes

int endOfMessage
 The "end of message" symbol.


Protected Attributes

ArithCodecarithCodec
 Pointer to arithmetic codec.

bool initialized
 Flag whether the context is initialized.


Detailed Description

Abstract predecessor for all context classes used in arithmetic coding/decoding.

Definition at line 56 of file contextbase.h.


Member Enumeration Documentation

enum ContextBase::OperationResult
 

An enum with results of some contex operations.

Enumeration values:
Ok  Everything was ok.
NotKnown  Attempt to code unknown symbol.
TooManySymbols  Could not install symbol.
NoMemory  Memory exceeded during installing symbol.

Definition at line 63 of file contextbase.h.


The documentation for this class was generated from the following file:
Generated on Wed Feb 5 10:43:04 2003 for Exalt by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002