OpenClonk
C4SoundLoaders::VorbisLoader::CompressedData Struct Reference

#include <C4SoundLoaders.h>

Public Member Functions

 CompressedData (BYTE *data, size_t data_length)
 
 CompressedData ()=default
 
void SetOwnedData (BYTE *data, size_t data_length)
 
 ~CompressedData ()
 
void clear ()
 

Public Attributes

BYTEdata {nullptr}
 
size_t data_length {0}
 
size_t data_pos {0}
 
bool is_data_owned {false}
 

Detailed Description

Definition at line 69 of file C4SoundLoaders.h.

Constructor & Destructor Documentation

◆ CompressedData() [1/2]

C4SoundLoaders::VorbisLoader::CompressedData::CompressedData ( BYTE data,
size_t  data_length 
)
inline

◆ CompressedData() [2/2]

C4SoundLoaders::VorbisLoader::CompressedData::CompressedData ( )
default

◆ ~CompressedData()

C4SoundLoaders::VorbisLoader::CompressedData::~CompressedData ( )
inline

Definition at line 81 of file C4SoundLoaders.h.

References clear().

Here is the call graph for this function:

Member Function Documentation

◆ clear()

void C4SoundLoaders::VorbisLoader::CompressedData::clear ( )
inline

Definition at line 82 of file C4SoundLoaders.h.

82 { if (is_data_owned) delete [] data; data=nullptr; }

References data, and is_data_owned.

Referenced by SetOwnedData(), and ~CompressedData().

Here is the caller graph for this function:

◆ SetOwnedData()

void C4SoundLoaders::VorbisLoader::CompressedData::SetOwnedData ( BYTE data,
size_t  data_length 
)
inline

Definition at line 78 of file C4SoundLoaders.h.

References clear(), data, data_length, data_pos, and is_data_owned.

Here is the call graph for this function:

Member Data Documentation

◆ data

BYTE* C4SoundLoaders::VorbisLoader::CompressedData::data {nullptr}

◆ data_length

size_t C4SoundLoaders::VorbisLoader::CompressedData::data_length {0}

◆ data_pos

size_t C4SoundLoaders::VorbisLoader::CompressedData::data_pos {0}

◆ is_data_owned

bool C4SoundLoaders::VorbisLoader::CompressedData::is_data_owned {false}

Definition at line 75 of file C4SoundLoaders.h.

Referenced by clear(), and SetOwnedData().


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