SourcePP
Several modern C++20 libraries for sanely parsing Valve's formats.
Loading...
Searching...
No Matches
sndpp::RIFF Class Reference

#include <RIFF.h>

Inheritance diagram for sndpp::RIFF:
Collaboration diagram for sndpp::RIFF:

Public Member Functions

 RIFF (uint32_t type, uint32_t signature=RIFF_SIGNATURE)
 RIFF (std::vector< std::byte > &&riffData, uint32_t type_)
 RIFF (std::span< const std::byte > riffData, uint32_t type_)
 RIFF (const std::filesystem::path &riffPath, uint32_t type_)
 operator bool () const
uint32_t getSignature () const
bool isBigEndian () const
const std::vector< std::pair< uint32_t, std::span< std::byte > > > & getChunks () const
bool hasChunk (uint32_t chunkType) const
std::vector< std::byte > getFirstChunk (uint32_t chunkType) const
bool hasNthChunk (uint32_t chunkType, uint32_t n) const
std::vector< std::byte > getNthChunk (uint32_t chunkType, uint32_t n) const

Protected Attributes

uint32_t signature
uint32_t type
std::vector< std::pair< uint32_t, std::span< std::byte > > > chunks
std::vector< std::byte > data

Detailed Description

Definition at line 16 of file RIFF.h.

Constructor & Destructor Documentation

◆ RIFF() [1/4]

RIFF::RIFF ( uint32_t type,
uint32_t signature = RIFF_SIGNATURE )
explicit

Definition at line 11 of file RIFF.cpp.

◆ RIFF() [2/4]

RIFF::RIFF ( std::vector< std::byte > && riffData,
uint32_t type_ )
explicit

Definition at line 19 of file RIFF.cpp.

◆ RIFF() [3/4]

RIFF::RIFF ( std::span< const std::byte > riffData,
uint32_t type_ )
explicit

Definition at line 47 of file RIFF.cpp.

◆ RIFF() [4/4]

RIFF::RIFF ( const std::filesystem::path & riffPath,
uint32_t type_ )
explicit

Definition at line 50 of file RIFF.cpp.

Member Function Documentation

◆ getChunks()

const std::vector< std::pair< uint32_t, std::span< std::byte > > > & RIFF::getChunks ( ) const
nodiscard

Definition at line 65 of file RIFF.cpp.

◆ getFirstChunk()

std::vector< std::byte > RIFF::getFirstChunk ( uint32_t chunkType) const
nodiscard

Definition at line 75 of file RIFF.cpp.

◆ getNthChunk()

std::vector< std::byte > RIFF::getNthChunk ( uint32_t chunkType,
uint32_t n ) const
nodiscard

Definition at line 91 of file RIFF.cpp.

◆ getSignature()

uint32_t RIFF::getSignature ( ) const
nodiscard

Definition at line 57 of file RIFF.cpp.

◆ hasChunk()

bool RIFF::hasChunk ( uint32_t chunkType) const
nodiscard

Definition at line 69 of file RIFF.cpp.

◆ hasNthChunk()

bool RIFF::hasNthChunk ( uint32_t chunkType,
uint32_t n ) const
nodiscard

Definition at line 84 of file RIFF.cpp.

◆ isBigEndian()

bool RIFF::isBigEndian ( ) const
nodiscard

Definition at line 61 of file RIFF.cpp.

◆ operator bool()

RIFF::operator bool ( ) const
explicitnodiscard

Definition at line 53 of file RIFF.cpp.

Member Data Documentation

◆ chunks

std::vector<std::pair<uint32_t, std::span<std::byte> > > sndpp::RIFF::chunks
protected

Definition at line 45 of file RIFF.h.

◆ data

std::vector<std::byte> sndpp::RIFF::data
protected

Definition at line 47 of file RIFF.h.

◆ signature

uint32_t sndpp::RIFF::signature
protected

Definition at line 43 of file RIFF.h.

◆ type

uint32_t sndpp::RIFF::type
protected

Definition at line 44 of file RIFF.h.


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