NIFFIO provides data types and functions to manipulate NIFF-specific features of NIFF files (eg. tags, chunk length tables). Because NIFF files are also RIFF files, NIFFIO makes heavy use of the RIFFIO API for ordinary RIFF features (eg. chunks).
The NIFF file format is described in the NIFF specification.
Notation Interchange File Format URL ftp://blackbox.cartah.washington.edu
NIFFIO supports NIFF 6b.
NIFFIO provides chunk length table routines that operate on a pointer to a NIFFIOChunkLengthTable structure.
A NIFFIOChunkLengthTable is not necessarily stored in memory the same way as a chunk length table is stored in a NIFF file.
All of the members of a NIFFIOChunkLengthTable are private.
A NIFFIOTag holds tag id, size, and file location information about a tag in a NIFF file.
Operations on NIFF files take pointers to a NIFFIOFile structure.
Represents a NIFF file, including I/O operations and its chunk length table.
There are no public members of a NIFFIOFile.
Because NIFF files are also RIFF files, all of the I/O operations defined for RIFFIO files have RIFFIO equivalents. (see *<NIFFIO Inherit>*)
Operations on the String Table take a pointer to a NIFFIOStbl structure.
This structure represents a single string item, including a pointer to its value and its offset into the NIFF file's string table. It is used by the NIFF writing program.
When writing a NIFF file, the user supplies an array of type NIFFIOStbl, with the pointers to each of the strings placed into the <*str> fields. The user then calls NIFFIOchunkStringTable with this array and the number of strings supplied. NIFFIOStoreStbl() puts the strings into string table format, calculating the offsets and storing each offset into the matching position for its string, and then stores the whole string table into the file. The string offsets can be thus be obtained and used by the writing program when writing out chunks which refer to the string later in the file.
NIFFIO uses a NIFFIOParser structure to store parsing information for NIFF files. A NIFFIOParser remembers user-supplied callbacks to process selected NIFF chunks and tags.
See Also: - *<NIFFIO Parse>*
PARAMETERS:
While parsing a NIFF file, users may keep track of their own
parsing information by supplying pointers to custom, user-defined data
structures. In turn, the NIFFIO parser will pass chunk and tag callbacks
the ``context'' of their enclosing (parent) chunk.
NIFFIOUserContexts are solely for the user's use.
NIFFIO will never dereference any NIFFIOUserContext.
User contexts may be safely ignored by any user who does not wish to
use them. It is safe to assign a null pointer to a NIFFIOUserContext.
In addition to the NIFFIOUserContext of its parent chunk, a
chunk callback routine also gets information about the chunk it
is processing through a NIFFIOChunkContext structure.
NIFFIOUserContext
User-defined parser state information provided by parent chunk callbacks.
NIFFIOChunkContext
Parser state information provided to chunk callbacks.
NIFFIOTagContext
Parser state information provided to tag callbacks.
Parser Callbacks
Here are the types of functions that the user needs to define to
use as callbacks.
NIFFIOChunkCallback
Process a chunk encountered by the parser.
NIFFIOTagCallback
Process a tag encountered by the parser.