
src/pmc/packfile.pmc - Packfile PMC

This class implements a Packfile object, as specified in PDD13. This object is the top level parser and serializer for *.pbc files.
static void copy_packfile_header(PARROT_INTERP,
PMC *self,
PackFile *pf)Copy attributes from PackFile* to Packfile PMC.
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.
void set_pointer(void *ptr)Set a raw PackFile* pointer to this Packfile PMC
INTVAL get_integer_keyed_str(STRING *key)Fetch an integer keyed value from the packfile object. Valid keys are:
STRING *get_string_keyed_str(STRING *key)Fetch a string keyed value from the packfile object. Valid keys are:
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:
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:
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.
void unpack(STRING *data)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.
static AttrEnumPackfile getAttrEnum(PARROT_INTERP,
const STRING *name)Gets an enumerated value corresponding to the attribute with that name.