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

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


#ifndef PARROT_PMC_PACKFILEANNOTATION_H_GUARD
#define PARROT_PMC_PACKFILEANNOTATION_H_GUARD

PARROT_EXPORT VTABLE* Parrot_PackfileAnnotation_update_vtable(ARGMOD(VTABLE*));
PARROT_EXPORT VTABLE* Parrot_PackfileAnnotation_ro_update_vtable(ARGMOD(VTABLE*));
PARROT_EXPORT VTABLE* Parrot_PackfileAnnotation_get_vtable(PARROT_INTERP);
PARROT_EXPORT VTABLE* Parrot_PackfileAnnotation_ro_get_vtable(PARROT_INTERP);
PARROT_EXPORT PMC*    Parrot_PackfileAnnotation_get_mro(PARROT_INTERP, ARGMOD(PMC* mro));
PARROT_EXPORT Hash*   Parrot_PackfileAnnotation_get_isa(PARROT_INTERP, ARGMOD_NULLOK(Hash* isa));

/* PackfileAnnotation PMC's underlying struct. */
typedef struct Parrot_PackfileAnnotation_attributes {
    STRING    * name;
    INTVAL offset;
    INTVAL value_type;
    INTVAL int_value;
    STRING    * str_value;
    PMC       * pmc_value;
} Parrot_PackfileAnnotation_attributes;

/* Macro to access underlying structure of a PackfileAnnotation PMC. */
#define PARROT_PACKFILEANNOTATION(o) ((Parrot_PackfileAnnotation_attributes *) PMC_data(o))


/* Generated macro accessors for 'name' attribute of PackfileAnnotation PMC. */
#define GETATTR_PackfileAnnotation_name(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_PackfileAnnotation_attributes *)PMC_data(pmc))->name; \
        } \
        else { \
            PMC * const attr_value = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "name")); \
            (dest) =  (PMC_IS_NULL(attr_value) ? (STRING *)NULL : VTABLE_get_string(interp, attr_value)); \
        } \
    } while (0)

#define SETATTR_PackfileAnnotation_name(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            PMC * const attr_value = Parrot_pmc_new(interp, enum_class_String); \
            VTABLE_set_string_native(interp, attr_value, value); \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "name"), attr_value); \
        } \
        else \
            ((Parrot_PackfileAnnotation_attributes *)PMC_data(pmc))->name = (value); \
    } while (0)


/* Generated macro accessors for 'offset' attribute of PackfileAnnotation PMC. */
#define GETATTR_PackfileAnnotation_offset(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_PackfileAnnotation_attributes *)PMC_data(pmc))->offset; \
        } \
        else { \
            PMC * const attr_value = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "offset")); \
            (dest) = (PMC_IS_NULL(attr_value) ? (INTVAL) 0: VTABLE_get_integer(interp, attr_value)); \
        } \
    } while (0)

#define SETATTR_PackfileAnnotation_offset(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, "offset"), attr_value); \
        } \
        else \
            ((Parrot_PackfileAnnotation_attributes *)PMC_data(pmc))->offset = (value); \
    } while (0)


/* Generated macro accessors for 'value_type' attribute of PackfileAnnotation PMC. */
#define GETATTR_PackfileAnnotation_value_type(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_PackfileAnnotation_attributes *)PMC_data(pmc))->value_type; \
        } \
        else { \
            PMC * const attr_value = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "value_type")); \
            (dest) = (PMC_IS_NULL(attr_value) ? (INTVAL) 0: VTABLE_get_integer(interp, attr_value)); \
        } \
    } while (0)

#define SETATTR_PackfileAnnotation_value_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, "value_type"), attr_value); \
        } \
        else \
            ((Parrot_PackfileAnnotation_attributes *)PMC_data(pmc))->value_type = (value); \
    } while (0)


/* Generated macro accessors for 'int_value' attribute of PackfileAnnotation PMC. */
#define GETATTR_PackfileAnnotation_int_value(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_PackfileAnnotation_attributes *)PMC_data(pmc))->int_value; \
        } \
        else { \
            PMC * const attr_value = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "int_value")); \
            (dest) = (PMC_IS_NULL(attr_value) ? (INTVAL) 0: VTABLE_get_integer(interp, attr_value)); \
        } \
    } while (0)

#define SETATTR_PackfileAnnotation_int_value(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, "int_value"), attr_value); \
        } \
        else \
            ((Parrot_PackfileAnnotation_attributes *)PMC_data(pmc))->int_value = (value); \
    } while (0)


/* Generated macro accessors for 'str_value' attribute of PackfileAnnotation PMC. */
#define GETATTR_PackfileAnnotation_str_value(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_PackfileAnnotation_attributes *)PMC_data(pmc))->str_value; \
        } \
        else { \
            PMC * const attr_value = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "str_value")); \
            (dest) =  (PMC_IS_NULL(attr_value) ? (STRING *)NULL : VTABLE_get_string(interp, attr_value)); \
        } \
    } while (0)

#define SETATTR_PackfileAnnotation_str_value(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            PMC * const attr_value = Parrot_pmc_new(interp, enum_class_String); \
            VTABLE_set_string_native(interp, attr_value, value); \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "str_value"), attr_value); \
        } \
        else \
            ((Parrot_PackfileAnnotation_attributes *)PMC_data(pmc))->str_value = (value); \
    } while (0)


/* Generated macro accessors for 'pmc_value' attribute of PackfileAnnotation PMC. */
#define GETATTR_PackfileAnnotation_pmc_value(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_PackfileAnnotation_attributes *)PMC_data(pmc))->pmc_value; \
        } \
        else { \
            (dest) = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "pmc_value")); \
        } \
    } while (0)

#define SETATTR_PackfileAnnotation_pmc_value(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "pmc_value"), value); \
        } \
        else \
            ((Parrot_PackfileAnnotation_attributes *)PMC_data(pmc))->pmc_value = (value); \
    } while (0)


#endif /* PARROT_PMC_PACKFILEANNOTATION_H_GUARD */

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

