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 IffChunkArrayGetChunks () const
 Get the pointer array of the iff chunks added. More...
 
virtual IffChunkAlloc (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. More...
 
UInt32 mFourCC
 The FourCC file type identifier. More...
 
IffChunkArray mChunks
 The IffChunk pointer array. More...
 

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]

Murl::Util::IffData::IffData ( UInt32  form,
UInt32  fourCC 
)

Constructor taking the file identifier and the file type identifier.

This method takes care of the system's byte ordering.

Parameters
formThe file format identifier.
fourCCThe 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
fourCCThe 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 void Murl::Util::IffData::AddChunk ( IffChunk chunk)
virtual

Add an iff chunk.

The chunk must be heap allocated using new, the IffData object takes the ownership of the memory.

Parameters
chunkThe chunk to add.

◆ GetChunks()

virtual const IffChunkArray& Murl::Util::IffData::GetChunks ( ) const
virtual

Get the pointer array of the iff chunks added.

Returns
The IffChunk pointer array.

◆ Alloc()

virtual IffChunk* Murl::Util::IffData::Alloc ( UInt32  fourCC,
UInt32  chunkSize,
UInt32  additionalSize = 0 
) const
virtual

Allocate and initialize an iff chunk.

This method takes care of the system's byte ordering and the iff size format.

Parameters
fourCCThe FourCC chunk identifier.
chunkSizeThe byte size of the chunk.
additionalSizeAdditional byte size to allocate.
Returns
The heap allocated and initialized iff chunk.

Referenced by AllocChunk().

◆ AllocChunk()

template<class ChunkType >
ChunkType* Murl::Util::IffData::AllocChunk ( UInt32  additionalSize = 0) const
inline

Alloc() an iff chunk of specified type.

Template Parameters
ChunkTypeThe iff chunk type which must have a public enum FOURCC constant defining the chunk identifier.
Parameters
additionalSizeAdditional byte size to allocate.
Returns
The heap allocated and initialized iff chunk of specified type.

References Alloc(), and Create().

◆ Create()

virtual Bool Murl::Util::IffData::Create ( Data data) const
virtual

Create an iff-file data object.

Parameters
dataThe data object to write the iff-file into.
Returns
true if successful.

Referenced by AllocChunk().

Member Data Documentation

◆ mForm

UInt32 Murl::Util::IffData::mForm
protected

The file format identifier.

◆ mFourCC

UInt32 Murl::Util::IffData::mFourCC
protected

The FourCC file type identifier.

◆ mChunks

IffChunkArray Murl::Util::IffData::mChunks
protected

The IffChunk pointer array.


The documentation for this class was generated from the following file:
  • murl_util_iff_data.h


Copyright © 2011-2018 Spraylight GmbH.