/* ex: set ro ft=c:
 * !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
 *
 * This file is generated automatically from './src/vm/parrot/pmc/serializationcontext.pmc'
 * by ../../../../local/lib/parrot/5.4.0/tools/build/pmc2c.pl.
 *
 * Any changes made here will be lost!
 *
 */

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


#ifndef PARROT_PMC_SERIALIZATIONCONTEXT_H_GUARD
#define PARROT_PMC_SERIALIZATIONCONTEXT_H_GUARD

#define PARROT_IN_EXTENSION
PARROT_DYNEXT_EXPORT VTABLE* Parrot_SerializationContext_get_vtable_pointer(PARROT_INTERP);
PARROT_DYNEXT_EXPORT void    Parrot_SerializationContext_class_init(PARROT_INTERP, int, int);
PARROT_DYNEXT_EXPORT VTABLE* Parrot_SerializationContext_update_vtable(ARGMOD(VTABLE*));
PARROT_DYNEXT_EXPORT VTABLE* Parrot_SerializationContext_ro_update_vtable(ARGMOD(VTABLE*));
PARROT_DYNEXT_EXPORT VTABLE* Parrot_SerializationContext_get_vtable(PARROT_INTERP);
PARROT_DYNEXT_EXPORT VTABLE* Parrot_SerializationContext_ro_get_vtable(PARROT_INTERP);
PARROT_DYNEXT_EXPORT PMC*    Parrot_SerializationContext_get_mro(PARROT_INTERP, ARGMOD(PMC* mro));
PARROT_DYNEXT_EXPORT Hash*   Parrot_SerializationContext_get_isa(PARROT_INTERP, ARGMOD_NULLOK(Hash* isa));

/* SerializationContext PMC's underlying struct. */
typedef struct Parrot_SerializationContext_attributes {
    STRING * handle;
    PMC * root_objects;
    PMC * root_stables;
    PMC * root_codes;
    STRING * description;
    PMC * rep_indexes;
    PMC * rep_scs;
} Parrot_SerializationContext_attributes;

/* Macro to access underlying structure of a SerializationContext PMC. */
#define PARROT_SERIALIZATIONCONTEXT(o) ((Parrot_SerializationContext_attributes *) PMC_data(o))


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

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


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

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


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

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


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

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


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

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


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

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


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

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


PARROT_DYNEXT_EXPORT Parrot_PMC Parrot_lib_serializationcontext_load(PARROT_INTERP);

#ifndef PARROT_DYNPMC_CLASS_LOAD
PARROT_DATA INTVAL dynpmc_class_SerializationContext;
#endif

#endif /* PARROT_PMC_SERIALIZATIONCONTEXT_H_GUARD */

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

