resonance 1.0.1
Loading...
Searching...
No Matches
HxChunkName Struct Reference

Four-character name of a RIFF or Standard MIDI File chunk. More...

#include <hxchunkname.h>

Public Member Functions

 HxChunkName (const char *pszText)
 Copy the first four characters of a literal.

Public Attributes

char mText [kLength]

Static Public Attributes

static constexpr int kLength = 4
 Number of characters in a chunk name.

Detailed Description

Four-character name of a RIFF or Standard MIDI File chunk.

The class is not polymorphic and has no RTTI. Its name is inferred. The fifteen known names below are objects rather than literals. The static initialiser of the chunk translation unit at 0x00145608 copies each four-character literal into its object at start-up with one unaligned word copy (the inline constructor below). Every comparison runs strncmp() over four characters against the object's address. The objects sit eight bytes apart from 0x00673a80.

The one member is public, because every reader compares or copies the characters directly and the image exposes no accessor.

Constructor & Destructor Documentation

◆ HxChunkName()

HxChunkName::HxChunkName ( const char * pszText)
inlineexplicit

Copy the first four characters of a literal.

Inline. The static initialiser expands it for each of the fifteen names.

Parameters
pszTextThe name. Only its first four characters are copied.

Member Data Documentation

◆ kLength

int HxChunkName::kLength = 4
staticconstexpr

Number of characters in a chunk name.

◆ mText

char HxChunkName::mText[kLength]

The four characters, with no terminator. +0x00


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