|
libopenraw
0.3.7
|
Represents an MRW Data Block. More...
#include <mrwcontainer.hpp>
Public Types | |
| typedef std::shared_ptr< DataBlock > | Ref |
Public Member Functions | |
| DataBlock (off_t start, MRWContainer *container) | |
| off_t | offset () const |
| off_t | length () const |
| std::string | name () const |
| Option< uint8_t > | uint8_val (off_t offset) const |
| Option< uint16_t > | uint16_val (off_t offset) const |
| Option< std::string > | string_val (off_t offset) const |
| bool | loaded () const |
Represents an MRW Data Block.
Definition at line 48 of file mrwcontainer.hpp.
| typedef std::shared_ptr<DataBlock> OpenRaw::Internals::MRW::DataBlock::Ref |
Shared pointer to DataBlock
Definition at line 51 of file mrwcontainer.hpp.
| OpenRaw::Internals::MRW::DataBlock::DataBlock | ( | off_t | start, |
| MRWContainer * | container | ||
| ) |
Construct a datablock from a location in the container
| start | the begin address relative to the container. |
| container | the container containing the data block. |
Definition at line 37 of file mrwcontainer.cpp.
References OpenRaw::Internals::RawContainer::fetchData(), name(), and OpenRaw::Internals::RawContainer::readInt32().
|
inline |
Return the length of the data block, excluding the block header.
Definition at line 65 of file mrwcontainer.hpp.
|
inline |
Return if the data block was loaded.
Definition at line 91 of file mrwcontainer.hpp.
|
inline |
Return the name of the data block.
Definition at line 69 of file mrwcontainer.hpp.
Referenced by DataBlock().
|
inline |
Return the offset of the data block from the begining of its container.
Definition at line 61 of file mrwcontainer.hpp.
| Option< std::string > OpenRaw::Internals::MRW::DataBlock::string_val | ( | off_t | offset | ) | const |
Return a string value at offset bytes fro the start of the data block
Definition at line 76 of file mrwcontainer.cpp.
References OpenRaw::Internals::RawContainer::fetchData().
| Option< uint16_t > OpenRaw::Internals::MRW::DataBlock::uint16_val | ( | off_t | offset | ) | const |
Return an unsigned 16-bit quantity at offset bytes from the start of the data block.
Definition at line 68 of file mrwcontainer.cpp.
References OpenRaw::Internals::RawContainer::readUInt16().
| Option< uint8_t > OpenRaw::Internals::MRW::DataBlock::uint8_val | ( | off_t | offset | ) | const |
Return an unsigned 8-bit quantity at offset bytes from the start of the data block.
Definition at line 60 of file mrwcontainer.cpp.