NAME

src/pmc/packfile.pmc - Packfile PMC

DESCRIPTION

This class implements a Packfile object, as specified in PDD13. This object is the top level parser and serializer for *.pbc files.

Methods

void init()
Initialize the structure. (Create a blank PackFile object.)
void mark()
Marks the Packfile as alive.
STRING *get_string()
Return raw serialized PBC file data.
void set_string_native(STRING *str)
Parse raw serialized PBC file data into the Packfile data structure.
INTVAL get_integer_keyed_str(STRING *key)
Fetch an integer keyed value from the packfile object. Valid keys are:
wordsize
byteorder
fptype
version_major
version_minor
version_patch
bytecode_major
bytecode_minor
uuid_type
uuid_length
STRING *get_string_keyed_str(STRING *key)
Fetch a string keyed value from the packfile object. Valid keys are:
uuid
INTVAL get_integer_keyed(PMC *key)
Fetch a keyed integer value from the packfile object. Dispatches to get_integer_keyed_str.
STRING *get_string_keyed(PMC *key)
Fetch a keyed string value from the packfile object. Dispatches to get_string_keyed_str.
void set_integer_keyed_str(STRING *key, INTVAL value)
Set an integer keyed value to the specified value. Valid keys are:
version_major
version_minor
version_patch
uuid_type
void set_integer_keyed(PMC *key, INTVALval)
Set a keyed integer value in the packfile object. Dispatches to set_integer_keyed_str.
* get_string_keyed_str (v-table)
Used to get data about fields in the header that have a string value. Valid keys are:
uuid
void set_string_keyed(PMC *key, STRING *val)
Set a keyed string value in the packfile object. Dispatches to set_string_keyed_str.
STRING * pack()
Return raw serialized PBC file data. Synonym for get_string.
STRING * unpack()
Parse raw serialized PBC file data into the Packfile data structure. Synonym for set_string.
PMC *get_directory()
Fetch the PackfileDirectory PMC that represents the directory segment at the start of the packfile.