The Interchange File Format data class. More...
#include "murl_util_iff_data.h"
Public Member Functions | |
IffData (UInt32 form, UInt32 fourCC) | |
Constructor taking the file identifier and the file type identifier. More... | |
IffData (UInt32 fourCC) | |
Constructor taking the file type identifier. More... | |
IffData () | |
Constructor to create an IffData object without a header. More... | |
virtual | ~IffData () |
The destructor. | |
virtual void | AddChunk (IffChunk *chunk) |
Add an iff chunk. More... | |
virtual const IffChunkArray & | GetChunks () const |
Get the pointer array of the iff chunks added. More... | |
virtual IffChunk * | Alloc (UInt32 fourCC, UInt32 chunkSize, UInt32 additionalSize=0) const |
Allocate and initialize an iff chunk. More... | |
template<class ChunkType > | |
ChunkType * | AllocChunk (UInt32 additionalSize=0) const |
Alloc() an iff chunk of specified type. More... | |
virtual Bool | Create (Data &data) const |
Create an iff-file data object. More... | |
Protected Attributes | |
UInt32 | mForm |
The file format identifier. | |
UInt32 | mFourCC |
The FourCC file type identifier. | |
IffChunkArray | mChunks |
The IffChunk pointer array. | |
Detailed Description
The Interchange File Format data class.
The IffData class is used to allocate and store application defined iff chunks. The Create() method composes an iff-file from the stored chunks.
Constructor & Destructor Documentation
◆ IffData() [1/3]
Constructor taking the file identifier and the file type identifier.
This method takes care of the system's byte ordering.
- Parameters
-
form The file format identifier. fourCC The file type identifier.
◆ IffData() [2/3]
Murl::Util::IffData::IffData | ( | UInt32 | fourCC | ) |
Constructor taking the file type identifier.
Set the file format identifier to 'MURL'. This method takes care of the system's byte ordering.
- Parameters
-
fourCC The file type identifier.
◆ IffData() [3/3]
Murl::Util::IffData::IffData | ( | ) |
Constructor to create an IffData object without a header.
When using this constructor, the data object does not include a file header. Only chunks are stored, which is useful for including the output data as a sub-stream within another IFF stream. This method takes care of the system's byte ordering.
Member Function Documentation
◆ AddChunk()
|
virtual |
Add an iff chunk.
The chunk must be heap allocated using new, the IffData object takes the ownership of the memory.
- Parameters
-
chunk The chunk to add.
◆ GetChunks()
|
virtual |
Get the pointer array of the iff chunks added.
- Returns
- The IffChunk pointer array.
◆ Alloc()
|
virtual |
Allocate and initialize an iff chunk.
This method takes care of the system's byte ordering and the iff size format.
- Parameters
-
fourCC The FourCC chunk identifier. chunkSize The byte size of the chunk. additionalSize Additional byte size to allocate.
- Returns
- The heap allocated and initialized iff chunk.
Referenced by AllocChunk().
◆ AllocChunk()
|
inline |
Alloc() an iff chunk of specified type.
- Template Parameters
-
ChunkType The iff chunk type which must have a public enum FOURCC_CHUNK constant defining the chunk identifier.
- Parameters
-
additionalSize Additional byte size to allocate.
- Returns
- The heap allocated and initialized iff chunk of specified type.
References Alloc().
◆ Create()
Create an iff-file data object.
- Parameters
-
data The data object to write the iff-file into.
- Returns
- true if successful.
The documentation for this class was generated from the following file:
- murl_util_iff_data.h