Main Page | Namespace List | Class List | File List | Namespace Members | Class Members | File Members

DecodeContext Class Reference

Class maintains context during section decoding. More...

#include <decodecontext.hpp>

List of all members.

Public Member Functions

 DecodeContext (file_it data_begin, file_it data_end)
std::string readFieldValue (std::string const &field_name, unsigned width_of_field_in_bits)
 Read the value of a field.

bool finished () const
 Test if input data has all been processed.

bool testCondition (std::string const &field, std::string const &op, unsigned long const &value) const
 Test a condition.

void registerCRC ()
 Register that the current section has a 4 byte CRC.

bool testLoopExit ()
 Section loop exit test.


Detailed Description

Class maintains context during section decoding.

Duties include:


Constructor & Destructor Documentation

DecodeContext::DecodeContext file_it  data_begin,
file_it  data_end
 


Member Function Documentation

bool DecodeContext::finished  )  const
 

Test if input data has all been processed.

Returns:
True if all data has been processed, false otherwise.

std::string DecodeContext::readFieldValue std::string const &  field_name,
unsigned  width_of_field_in_bits
 

Read the value of a field.

Parameters:
field_name 
width_of_field_in_bits 
Returns:
The value read, as a hex string
Note:
This function is designed to handle arbitrary length field widths, which is why the result is returned as a string.

void DecodeContext::registerCRC  ) 
 

Register that the current section has a 4 byte CRC.

This will affect where the final loop in the section is exited.

bool DecodeContext::testCondition std::string const &  field,
std::string const &  op,
unsigned long const &  value
const
 

Test a condition.

Returns:
The value of expression (field op value)
Example pushFieldValue("program_number", 0) testCondition("program_number", "==", 0) --> true

bool DecodeContext::testLoopExit  ) 
 

Section loop exit test.

Returns:
True if the loop has been completed, false otherwise.


The documentation for this class was generated from the following files:
Generated on Fri Nov 26 15:31:03 2004 for DVB Codec by doxygen 1.3.7