RawSpeed
fast raw decoding library
Loading...
Searching...
No Matches
rawspeed::DataBuffer Class Reference

#include "io/Buffer.h"

Inheritance diagram for rawspeed::DataBuffer:
[legend]
Collaboration diagram for rawspeed::DataBuffer:
[legend]

Public Types

using size_type = uint32_t

Public Member Functions

 DataBuffer ()=default
 DataBuffer (Buffer data_, Endianness endianness_)
template<typename T>
T get (size_type offset, size_type index=0) const
Endianness getByteOrder () const
Endianness setByteOrder (Endianness endianness_)
Array1DRef< const uint8_t > getAsArray1DRef () const
 operator Array1DRef< const uint8_t > () const
Buffer getSubView (size_type offset, size_type size_) const
Buffer getSubView (size_type offset) const
uint8_t operator[] (size_type offset) const
const uint8_t * begin () const
const uint8_t * end () const
template<typename T>
T get (bool inNativeByteOrder, size_type offset, size_type index=0) const
size_type RAWSPEED_READONLY getSize () const
bool isValid (size_type offset, size_type count=1) const

Protected Attributes

const uint8_t * data = nullptr

Private Attributes

Endianness endianness = Endianness::little
size_type size = 0

Detailed Description

Definition at line 133 of file Buffer.h.

Member Typedef Documentation

◆ size_type

Definition at line 49 of file Buffer.h.

Constructor & Destructor Documentation

◆ DataBuffer() [1/2]

rawspeed::DataBuffer::DataBuffer ( )
default

Referenced by rawspeed::ByteStream::ByteStream(), rawspeed::ByteStream::getSubStream(), and rawspeed::ByteStream::getSubStream().

Here is the caller graph for this function:

◆ DataBuffer() [2/2]

rawspeed::DataBuffer::DataBuffer ( Buffer data_,
Endianness endianness_ )
inlineexplicit

Definition at line 141 of file Buffer.h.

References rawspeed::Buffer::Buffer(), and endianness.

Here is the call graph for this function:

Member Function Documentation

◆ begin()

const uint8_t * rawspeed::Buffer::begin ( ) const
inlinenodiscardinherited

◆ end()

const uint8_t * rawspeed::Buffer::end ( ) const
inlinenodiscardinherited

Definition at line 102 of file Buffer.h.

References Array1DRef< T >::end(), and getAsArray1DRef().

Referenced by rawspeed::TiffEntry::getString(), rawspeed::operator<(), rawspeed::PanasonicV4Decompressor::ProxyStream::parseBlock(), rawspeed::PanasonicV5Decompressor::ProxyStream::parseBlock(), rawspeed::ByteStream::peekString(), and rawspeed::HuffmanCode< CodeTag >::setNCodesPerLength().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get() [1/2]

template<typename T>
T rawspeed::Buffer::get ( bool inNativeByteOrder,
size_type offset,
size_type index = 0 ) const
inlinenodiscardinherited

Definition at line 107 of file Buffer.h.

References Buffer(), rawspeed::buf, rawspeed::getByteSwapped(), getSubView(), and rawspeed::T().

Referenced by rawspeed::DataBuffer::get().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get() [2/2]

template<typename T>
T rawspeed::DataBuffer::get ( size_type offset,
size_type index = 0 ) const
inlinenodiscard

Definition at line 147 of file Buffer.h.

References assert(), rawspeed::big, endianness, rawspeed::Buffer::get(), rawspeed::getHostEndianness(), rawspeed::little, rawspeed::T(), and rawspeed::unknown.

Referenced by rawspeed::IiqDecoder::isAppropriateDecoder(), and rawspeed::ByteStream::peek().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getAsArray1DRef()

◆ getByteOrder()

Endianness rawspeed::DataBuffer::getByteOrder ( ) const
inlinenodiscard

Definition at line 154 of file Buffer.h.

References endianness.

Referenced by rawspeed::RafDecoder::decodeRawInternal(), rawspeed::ByteStream::getSubStream(), rawspeed::ByteStream::getSubStream(), and rawspeed::ArwDecoder::GetWB().

Here is the caller graph for this function:

◆ getSize()

◆ getSubView() [1/2]

Buffer rawspeed::Buffer::getSubView ( size_type offset) const
inlinenodiscardinherited

Definition at line 85 of file Buffer.h.

References Buffer(), getSize(), getSubView(), isValid(), and ThrowIOE.

Here is the call graph for this function:

◆ getSubView() [2/2]

Buffer rawspeed::Buffer::getSubView ( size_type offset,
size_type size_ ) const
inlinenodiscardinherited

◆ isValid()

bool rawspeed::Buffer::isValid ( size_type offset,
size_type count = 1 ) const
inlinenodiscardinherited

Definition at line 117 of file Buffer.h.

References getSize().

Referenced by rawspeed::ByteStream::check(), getSubView(), getSubView(), and rawspeed::ByteStream::hasPatternAt().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator Array1DRef< const uint8_t >()

rawspeed::Buffer::operator Array1DRef< const uint8_t > ( ) const
inlineexplicitinherited

Definition at line 74 of file Buffer.h.

References getAsArray1DRef().

Here is the call graph for this function:

◆ operator[]()

uint8_t rawspeed::Buffer::operator[] ( size_type offset) const
inlineinherited

Definition at line 94 of file Buffer.h.

References getAsArray1DRef().

Here is the call graph for this function:

◆ setByteOrder()

Endianness rawspeed::DataBuffer::setByteOrder ( Endianness endianness_)
inline

Definition at line 156 of file Buffer.h.

References endianness.

Referenced by rawspeed::DngOpcodes::DngOpcodes(), rawspeed::ArwDecoder::DecodeARW2(), rawspeed::TiffParser::parse(), rawspeed::ArwDecoder::ParseA100WB(), rawspeed::TiffIFD::parseMakerNote(), and rawspeed::NefDecoder::parseWhiteBalance().

Here is the caller graph for this function:

Member Data Documentation

◆ data

const uint8_t* rawspeed::Buffer::data = nullptr
protectedinherited

Definition at line 52 of file Buffer.h.

Referenced by Buffer(), and getAsArray1DRef().

◆ endianness

Endianness rawspeed::DataBuffer::endianness = Endianness::little
private

Definition at line 136 of file Buffer.h.

Referenced by DataBuffer(), get(), getByteOrder(), and setByteOrder().

◆ size

size_type rawspeed::Buffer::size = 0
privateinherited

Definition at line 55 of file Buffer.h.

Referenced by Buffer(), getAsArray1DRef(), and getSize().


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