dirac::BasicOutputManager Class Reference

Class for managing bit- and byte-oriented output. More...

#include <bit_manager.h>

List of all members.

Public Member Functions

 BasicOutputManager (std::ostream *out_data)
 Constructor.
 ~BasicOutputManager ()
 Destructor.
void OutputBit (const bool &bit)
 Write a bit out.
void OutputBit (const bool &bit, int &count)
 Write a bit out and increment count.
void OutputByte (const char &byte)
 Write a byte out.
void OutputBytes (char *str_array)
 Write a null-terminated set of bytes out.
void OutputBytes (char *str_array, int num)
 Write a number of bytes out.
size_t GetNumBytes () const
 Return the number of bytes last output to file.
size_t Size () const
 Size of the internal data cache in bytes.

Friends

class UnitOutputManager
class FrameOutputManager
class SequenceOutputManager


Detailed Description

Class for managing bit- and byte-oriented output.

A class for managing bit- and byte-oriented output. Wraps around an ostream object but stores data in memory until told told to write out in order to support data re-ordering - for example writing a header once the subsequent data has been obtained. Implementation to be reviewed in future. TJD 13 April 2004.

Definition at line 94 of file bit_manager.h.


Constructor & Destructor Documentation

BasicOutputManager::BasicOutputManager std::ostream *  out_data  ) 
 

Constructor.

Constructor requires an ostream object pointer.

Parameters:
out_data the output stream object pointer

Definition at line 52 of file bit_manager.cpp.


Member Function Documentation

size_t dirac::BasicOutputManager::GetNumBytes  )  const [inline]
 

Return the number of bytes last output to file.

Return the number of bytes last output to file.

Definition at line 151 of file bit_manager.h.

Referenced by dirac::SequenceOutputManager::WriteSeqHeaderToFile(), and dirac::SequenceOutputManager::WriteSeqTrailerToFile().

void BasicOutputManager::OutputBit const bool &  bit,
int &  count
 

Write a bit out and increment count.

Write a bit out to the internal data cache and increment the count of bits written.

Definition at line 100 of file bit_manager.cpp.

References OutputBit().

void BasicOutputManager::OutputBit const bool &  bit  ) 
 

Write a bit out.

Write a bit out to the internal data cache.

Definition at line 83 of file bit_manager.cpp.

Referenced by dirac::FrameCompressor::Compress(), dirac::ArithCodec< T >::EncodeTriple(), dirac::ArithCodec< T >::FlushEncoder(), dirac::GolombCode(), OutputBit(), and dirac::UnsignedGolombCode().

void BasicOutputManager::OutputByte const char &  byte  ) 
 

Write a byte out.

Write a byte out to the internal data cache.

Definition at line 106 of file bit_manager.cpp.

void BasicOutputManager::OutputBytes char *  str_array,
int  num
 

Write a number of bytes out.

Write a number of bytes out to the internal data cache.

Definition at line 123 of file bit_manager.cpp.

void BasicOutputManager::OutputBytes char *  str_array  ) 
 

Write a null-terminated set of bytes out.

Write a null-terminated set of bytes out to the internal data cache.

Definition at line 113 of file bit_manager.cpp.

Referenced by dirac::FrameCompressor::Compress(), and dirac::SequenceCompressor::EndSequence().

size_t dirac::BasicOutputManager::Size  )  const [inline]
 

Size of the internal data cache in bytes.

Size of the internal data cache in bytes.

Definition at line 157 of file bit_manager.h.


The documentation for this class was generated from the following files:
Generated on Tue Dec 13 14:49:19 2005 for guliverkli by  doxygen 1.4.5