OpenRaw::Internals::MRW::DataBlock Class Reference

#include <mrwcontainer.h>

List of all members.

Public Types

typedef boost::shared_ptr
< DataBlock
Ref
typedef std::vector< Ref > RefVec

Public Member Functions

 DataBlock (off_t start, MRWContainer *container)
off_t offset ()
off_t length ()
std::string name ()
int8_t int8_val (off_t offset)
uint8_t uint8_val (off_t offset)
uint16_t uint16_val (off_t offset)
bool loaded () const


Detailed Description

Represents an MRW Data Block.

Definition at line 45 of file mrwcontainer.h.


Constructor & Destructor Documentation

OpenRaw::Internals::MRW::DataBlock::DataBlock ( off_t  start,
MRWContainer container 
)

Construct a datablock from a location in the container

Parameters:
start the begin address relative to the container.
container the container containing the data block.

Definition at line 35 of file mrwcontainer.cpp.

References OpenRaw::Internals::RawContainer::fetchData(), OpenRaw::Internals::RawContainer::file(), name(), and OpenRaw::Internals::RawContainer::readInt32().


Member Function Documentation

off_t OpenRaw::Internals::MRW::DataBlock::offset (  )  [inline]

Return the offset of the data block from the begining of its container.

Definition at line 59 of file mrwcontainer.h.

off_t OpenRaw::Internals::MRW::DataBlock::length (  )  [inline]

Return the length of the data block, excluding the block header.

Definition at line 66 of file mrwcontainer.h.

std::string OpenRaw::Internals::MRW::DataBlock::name (  )  [inline]

Return the name of the data block.

Definition at line 73 of file mrwcontainer.h.

Referenced by DataBlock().

int8_t OpenRaw::Internals::MRW::DataBlock::int8_val ( off_t  offset  ) 

Return a signed 8-bit quantity at offset bytes from the start of the data block.

Definition at line 58 of file mrwcontainer.cpp.

References OpenRaw::Internals::RawContainer::file(), OpenRaw::Internals::RawContainer::readInt8(), and OpenRaw::IO::Stream::seek().

uint8_t OpenRaw::Internals::MRW::DataBlock::uint8_val ( off_t  offset  ) 

Return an unsigned 8-bit quantity at offset bytes from the start of the data block.

Definition at line 67 of file mrwcontainer.cpp.

References OpenRaw::Internals::RawContainer::file(), OpenRaw::Internals::RawContainer::readUInt8(), and OpenRaw::IO::Stream::seek().

uint16_t OpenRaw::Internals::MRW::DataBlock::uint16_val ( off_t  offset  ) 

Return an unsigned 16-bit quantity at offset bytes from the start of the data block.

Definition at line 76 of file mrwcontainer.cpp.

References OpenRaw::Internals::RawContainer::file(), OpenRaw::Internals::RawContainer::readUInt16(), and OpenRaw::IO::Stream::seek().


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

Generated on Sun Mar 23 09:28:21 2008 for libopenraw by  doxygen 1.5.5