/* ex: set ro ft=c: -*- buffer-read-only:t -*-
 * !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
 *
 * This file is generated automatically from './src/pmc/packfiledebug.pmc'
 * by tools/build/pmc2c.pl.
 *
 * Any changes made here will be lost!
 *
 */

/* HEADERIZER HFILE: none */
/* HEADERIZER STOP */


#ifndef PARROT_PMC_PACKFILEDEBUG_H_GUARD
#define PARROT_PMC_PACKFILEDEBUG_H_GUARD

PARROT_EXPORT VTABLE* Parrot_PackfileDebug_update_vtable(ARGMOD(VTABLE*));
PARROT_EXPORT VTABLE* Parrot_PackfileDebug_ro_update_vtable(ARGMOD(VTABLE*));
PARROT_EXPORT VTABLE* Parrot_PackfileDebug_get_vtable(PARROT_INTERP);
PARROT_EXPORT VTABLE* Parrot_PackfileDebug_ro_get_vtable(PARROT_INTERP);
PARROT_EXPORT PMC*    Parrot_PackfileDebug_get_mro(PARROT_INTERP, ARGMOD(PMC* mro));
PARROT_EXPORT Hash*   Parrot_PackfileDebug_get_isa(PARROT_INTERP, ARGMOD_NULLOK(Hash* isa));

/* PackfileDebug PMC's underlying struct. */
typedef struct Parrot_PackfileDebug_attributes {
    PMC * directory;
    INTVAL type;
    PMC    * opcodes;
    PMC * const_table;
    INTVAL num_mappings;
    PMC * mapping_offset;
    PMC * mapping_filename;
} Parrot_PackfileDebug_attributes;

/* Macro to access underlying structure of a PackfileDebug PMC. */
#define PARROT_PACKFILEDEBUG(o) ((Parrot_PackfileDebug_attributes *) PMC_data(o))


/* Generated macro accessors for 'directory' attribute of PackfileDebug PMC. */
#define GETATTR_PackfileDebug_directory(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_PackfileDebug_attributes *)PMC_data(pmc))->directory; \
        } \
        else { \
            (dest) = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "directory")); \
        } \
    } while (0)
#define SETATTR_PackfileDebug_directory(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "directory"), value); \
        } \
        else \
            ((Parrot_PackfileDebug_attributes *)PMC_data(pmc))->directory = (value); \
    } while (0)


/* Generated macro accessors for 'type' attribute of PackfileDebug PMC. */
#define GETATTR_PackfileDebug_type(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_PackfileDebug_attributes *)PMC_data(pmc))->type; \
        } \
        else { \
            PMC * const attr_value = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "type")); \
            (dest) = (PMC_IS_NULL(attr_value) ? (INTVAL) 0: VTABLE_get_integer(interp, attr_value)); \
        } \
    } while (0)
#define SETATTR_PackfileDebug_type(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            PMC * const attr_value = Parrot_pmc_new_init_int(interp, enum_class_Integer, value); \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "type"), attr_value); \
        } \
        else \
            ((Parrot_PackfileDebug_attributes *)PMC_data(pmc))->type = (value); \
    } while (0)


/* Generated macro accessors for 'opcodes' attribute of PackfileDebug PMC. */
#define GETATTR_PackfileDebug_opcodes(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_PackfileDebug_attributes *)PMC_data(pmc))->opcodes; \
        } \
        else { \
            (dest) = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "opcodes")); \
        } \
    } while (0)
#define SETATTR_PackfileDebug_opcodes(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "opcodes"), value); \
        } \
        else \
            ((Parrot_PackfileDebug_attributes *)PMC_data(pmc))->opcodes = (value); \
    } while (0)


/* Generated macro accessors for 'const_table' attribute of PackfileDebug PMC. */
#define GETATTR_PackfileDebug_const_table(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_PackfileDebug_attributes *)PMC_data(pmc))->const_table; \
        } \
        else { \
            (dest) = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "const_table")); \
        } \
    } while (0)
#define SETATTR_PackfileDebug_const_table(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "const_table"), value); \
        } \
        else \
            ((Parrot_PackfileDebug_attributes *)PMC_data(pmc))->const_table = (value); \
    } while (0)


/* Generated macro accessors for 'num_mappings' attribute of PackfileDebug PMC. */
#define GETATTR_PackfileDebug_num_mappings(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_PackfileDebug_attributes *)PMC_data(pmc))->num_mappings; \
        } \
        else { \
            PMC * const attr_value = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "num_mappings")); \
            (dest) = (PMC_IS_NULL(attr_value) ? (INTVAL) 0: VTABLE_get_integer(interp, attr_value)); \
        } \
    } while (0)
#define SETATTR_PackfileDebug_num_mappings(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            PMC * const attr_value = Parrot_pmc_new_init_int(interp, enum_class_Integer, value); \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "num_mappings"), attr_value); \
        } \
        else \
            ((Parrot_PackfileDebug_attributes *)PMC_data(pmc))->num_mappings = (value); \
    } while (0)


/* Generated macro accessors for 'mapping_offset' attribute of PackfileDebug PMC. */
#define GETATTR_PackfileDebug_mapping_offset(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_PackfileDebug_attributes *)PMC_data(pmc))->mapping_offset; \
        } \
        else { \
            (dest) = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "mapping_offset")); \
        } \
    } while (0)
#define SETATTR_PackfileDebug_mapping_offset(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "mapping_offset"), value); \
        } \
        else \
            ((Parrot_PackfileDebug_attributes *)PMC_data(pmc))->mapping_offset = (value); \
    } while (0)


/* Generated macro accessors for 'mapping_filename' attribute of PackfileDebug PMC. */
#define GETATTR_PackfileDebug_mapping_filename(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_PackfileDebug_attributes *)PMC_data(pmc))->mapping_filename; \
        } \
        else { \
            (dest) = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "mapping_filename")); \
        } \
    } while (0)
#define SETATTR_PackfileDebug_mapping_filename(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "mapping_filename"), value); \
        } \
        else \
            ((Parrot_PackfileDebug_attributes *)PMC_data(pmc))->mapping_filename = (value); \
    } while (0)


#endif /* PARROT_PMC_PACKFILEDEBUG_H_GUARD */

/*
 * Local variables:
 *   c-file-style: "parrot"
 * End:
 * vim: expandtab shiftwidth=4:
 */

