kviewshell
GIFFChunk Class Reference
GIFFChunk# is the base class for other IFF chunks understood by { GIFFManager}. More...
#include <GIFFManager.h>
Public Member Functions | |
void | add_chunk (const GP< GIFFChunk > &chunk, int order=-1) |
bool | check_name (GUTF8String name) |
void | del_chunk (const GUTF8String &name) |
GP< GIFFChunk > | get_chunk (const GUTF8String &name, int *position=0) |
int | get_chunks_number (void) |
int | get_chunks_number (const GUTF8String &name) |
void | save (IFFByteStream &istr, bool use_trick=0) |
void | set_name (GUTF8String name) |
virtual | ~GIFFChunk (void) |
Static Public Member Functions | |
static GP< GIFFChunk > | create (const GUTF8String &name, const TArray< char > &data) |
static GP< GIFFChunk > | create (const GUTF8String &name) |
static GP< GIFFChunk > | create (void) |
GIFFManager.h | |
Files #"GIFFManager.h"# and #"GIFFManager.cpp"# define more convenient interface to IFF files. You may want to use the { GIFFManager} class instead of coping with { IFFByteStream} especially when you have to insert or move chunks, which is a kind of tricky with sequential access provided by { IFFByteStream}. You will mostly deal with { GIFFManager} class, but sometimes you may want to use { GIFFChunk}s as well thus bypassing { GIFFManager}'s interface and working with the chunks hierarchy yourself. Interface to IFF files.
| |
GIFFChunk (const GUTF8String &name, const TArray< char > &data) | |
GIFFChunk (const GUTF8String &name) | |
GIFFChunk (void) | |
TArray< char > | get_data (void) const |
GUTF8String | get_full_name (void) const |
GUTF8String | get_name (void) const |
GUTF8String | get_type (void) const |
bool | is_container (void) const |
Detailed Description
GIFFChunk# is the base class for other IFF chunks understood by { GIFFManager}.It provides some basic interface, and is not supposed to be used on its own.
Definition at line 103 of file GIFFManager.h.
Constructor & Destructor Documentation
GIFFChunk::GIFFChunk | ( | void | ) | [inline, protected] |
Definition at line 189 of file GIFFManager.h.
GIFFChunk::GIFFChunk | ( | const GUTF8String & | name | ) | [inline, protected] |
Definition at line 192 of file GIFFManager.h.
GIFFChunk::GIFFChunk | ( | const GUTF8String & | name, | |
const TArray< char > & | data | |||
) | [inline, protected] |
Definition at line 195 of file GIFFManager.h.
GIFFChunk::~GIFFChunk | ( | void | ) | [virtual] |
Member Function Documentation
Adds the {chunk} to the chunks list at position {order}.
Set {order} to #-1# to append the chunk to the list. { Note!} By adding chunk PROP# you will convert this chunk to type LIST# {automatically}.
Definition at line 175 of file GIFFManager.cpp.
bool GIFFChunk::check_name | ( | GUTF8String | name | ) |
Parses the {name} probably containing colon and compares it with its own name returning TRUE if they are the same.
Definition at line 126 of file GIFFManager.cpp.
static GP<GIFFChunk> GIFFChunk::create | ( | const GUTF8String & | name, | |
const TArray< char > & | data | |||
) | [inline, static] |
static GP<GIFFChunk> GIFFChunk::create | ( | const GUTF8String & | name | ) | [inline, static] |
Creates the chunk with the given name.
The {name} may not contain dots colons or brackets
Definition at line 115 of file GIFFManager.h.
void GIFFChunk::del_chunk | ( | const GUTF8String & | name | ) |
Removes the chunk with given {name}.
The {name} may not contain dots, but MAY contain colons and brackets (the latter - for specifying the chunk number)
Definition at line 244 of file GIFFManager.cpp.
GP< GIFFChunk > GIFFChunk::get_chunk | ( | const GUTF8String & | name, | |
int * | position = 0 | |||
) |
Returns the chunk with given {name}.
The {name} may not contain dots, but MAY contain colons and brackets (the latter - for specifying the chunk number). If {position} is not zero then the chunk position in its parent will be put into #*position#
Definition at line 270 of file GIFFManager.cpp.
int GIFFChunk::get_chunks_number | ( | void | ) |
Definition at line 298 of file GIFFManager.cpp.
int GIFFChunk::get_chunks_number | ( | const GUTF8String & | name | ) |
Returns the number of chunks with given {name}.
The {name} may not contain dots and brackets. If {name} is ZERO, the total number of chunks will be returned.
Definition at line 307 of file GIFFManager.cpp.
TArray< char > GIFFChunk::get_data | ( | void | ) | const [inline] |
GUTF8String GIFFChunk::get_full_name | ( | void | ) | const [inline] |
Returns full chunk name, with possible container specification.
Definition at line 180 of file GIFFManager.h.
GUTF8String GIFFChunk::get_name | ( | void | ) | const [inline] |
Returns the name of the chunk (without possible FORM:# or similar prefixes).
Definition at line 174 of file GIFFManager.h.
GUTF8String GIFFChunk::get_type | ( | void | ) | const [inline] |
Returns the chunk type, like CAT# for chunk CAT:DJVU#.
Definition at line 177 of file GIFFManager.h.
bool GIFFChunk::is_container | ( | void | ) | const [inline] |
Returns TRUE if the chunk may contain other chunks or FALSE otherwise.
Definition at line 183 of file GIFFManager.h.
void GIFFChunk::save | ( | IFFByteStream & | istr, | |
bool | use_trick = 0 | |||
) |
Saves the chunk into the { IFFByteStream}.
Set {use_trick} to #1# if this is a top-level chunk
Definition at line 144 of file GIFFManager.cpp.
void GIFFChunk::set_name | ( | GUTF8String | name | ) |
Sets the chunk name.
The {name} may not contain dots or brackets, but { may} contain colons.
Definition at line 100 of file GIFFManager.cpp.
The documentation for this class was generated from the following files: