foobar2000 SDK  2015-08-03
Public Member Functions | Private Attributes
bitreader_helper::bitreader_limited

#include <bitreader_helper.h>

Public Member Functions

 bitreader_limited (const t_uint8 *p_ptr, t_size p_base, t_size p_remaining)
 
t_size get_bitptr () const
 
t_size get_remaining () const
 
t_size read (t_size p_bits)
 
void skip (t_size p_bits)
 

Private Attributes

bitreader m_reader
 
t_size m_remaining
 

Detailed Description

Definition at line 91 of file bitreader_helper.h.

Constructor & Destructor Documentation

bitreader_helper::bitreader_limited::bitreader_limited ( const t_uint8 p_ptr,
t_size  p_base,
t_size  p_remaining 
)
inline

Definition at line 94 of file bitreader_helper.h.

Member Function Documentation

t_size bitreader_helper::bitreader_limited::get_bitptr ( ) const
inline

Definition at line 96 of file bitreader_helper.h.

t_size bitreader_helper::bitreader_limited::get_remaining ( ) const
inline

Definition at line 98 of file bitreader_helper.h.

t_size bitreader_helper::bitreader_limited::read ( t_size  p_bits)
inline

Definition at line 106 of file bitreader_helper.h.

107  {
108  if (p_bits > m_remaining) throw exception_io_data_truncation();
109  m_remaining -= p_bits;
110  return m_reader.read(p_bits);
111  }
t_size read(t_size p_bits)
void bitreader_helper::bitreader_limited::skip ( t_size  p_bits)
inline

Definition at line 100 of file bitreader_helper.h.

100  {
101  if (p_bits > m_remaining) throw exception_io_data_truncation();
102  m_remaining -= p_bits;
103  m_reader.skip(p_bits);
104  }
void skip(t_size p_bits)

Field Documentation

bitreader bitreader_helper::bitreader_limited::m_reader
private

Definition at line 114 of file bitreader_helper.h.

t_size bitreader_helper::bitreader_limited::m_remaining
private

Definition at line 115 of file bitreader_helper.h.


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