|
resonance 1.0.1
|
Header of one RIFF or Standard MIDI File chunk: its name, its size, and whether it is a list. More...
#include <hxchunkheader.h>

Public Member Functions | |
| HxChunkHeader () | |
| Construct an unread header named ?
| |
| HxChunkHeader (const HxChunkName &name, int nSize, int nIsList) | |
| Construct a header from its three fields. | |
| HxChunkName | Name () const |
| Report the chunk name by value. | |
| HxStream & | Read (HxStream &stream) |
| Read the header from a stream. | |
| void | Print (std::ostream &stream) |
| Write the header to a diagnostic stream as LIST: for a list, the four characters, and the size in angle brackets. | |
Public Attributes | |
| HxChunkName | mName |
| int | mSize |
| int | mIsList |
Header of one RIFF or Standard MIDI File chunk: its name, its size, and whether it is a list.
The class is not polymorphic and has no RTTI. Its name comes from the debugging symbols of the North American demo release. The twelve-byte size comes from the heap copies HxIListChunk and HxIDataChunk allocate. A header named LIST or RIFF is a list. Read() replaces its name with the form type in the next four bytes, marks the header as a list, and takes the four bytes out of the size.
Every member is public, because HxIListChunk, HxIDataChunk, and Mid::Reader read the fields directly and the image exposes no accessor.
|
inline |
Construct an unread header named ?
???.
Inline. HxIListChunk's constructors and HxIDataChunk's stream constructor expand it, copying the name from the literal at 0x007d3eb8.
|
inline |
Construct a header from its three fields.
Inline. HxIListChunk's stream constructor expands it for a stream with no header of its own, naming the whole stream a list.
| name | The name. |
| nSize | The size. |
| nIsList | Non-zero for a list. |
|
inline |
Report the chunk name by value.
Inline. Every comparison outside Read() compares a stack copy of the name, the temporary this accessor returns.
Read the header from a stream.
Reads the name raw and the size through HxStream::ReadNum(). A LIST or RIFF header then reads its form type over the name, is marked a list, and loses four bytes of size. Any other header is marked not a list.
| stream | The stream to read from. |
| void HxChunkHeader::Print | ( | std::ostream & | stream | ) |
Write the header to a diagnostic stream as LIST: for a list, the four characters, and the size in angle brackets.
| stream | The stream to write to. |
| HxChunkName HxChunkHeader::mName |
The chunk name, or a list's form type. +0x00
| int HxChunkHeader::mSize |
Bytes of payload after the header. +0x04
| int HxChunkHeader::mIsList |
Non-zero for a LIST or RIFF header. +0x08