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

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


#ifndef PARROT_PMC_ORDEREDHASHITERATOR_H_GUARD
#define PARROT_PMC_ORDEREDHASHITERATOR_H_GUARD

PARROT_EXPORT VTABLE* Parrot_OrderedHashIterator_update_vtable(ARGMOD(VTABLE*));
PARROT_EXPORT VTABLE* Parrot_OrderedHashIterator_ro_update_vtable(ARGMOD(VTABLE*));
PARROT_EXPORT VTABLE* Parrot_OrderedHashIterator_get_vtable(PARROT_INTERP);
PARROT_EXPORT VTABLE* Parrot_OrderedHashIterator_ro_get_vtable(PARROT_INTERP);
PARROT_EXPORT PMC*    Parrot_OrderedHashIterator_get_mro(PARROT_INTERP, ARGMOD(PMC* mro));
PARROT_EXPORT Hash*   Parrot_OrderedHashIterator_get_isa(PARROT_INTERP, ARGMOD_NULLOK(Hash* isa));

/* OrderedHashIterator PMC's underlying struct. */
typedef struct Parrot_OrderedHashIterator_attributes {
    PMC        * pmc_hash;
    PMC        * next_entry;
    INTVAL pos;
    INTVAL elements;
    INTVAL reverse;
} Parrot_OrderedHashIterator_attributes;

/* Macro to access underlying structure of a OrderedHashIterator PMC. */
#define PARROT_ORDEREDHASHITERATOR(o) ((Parrot_OrderedHashIterator_attributes *) PMC_data(o))


/* Generated macro accessors for 'pmc_hash' attribute of OrderedHashIterator PMC. */
#define GETATTR_OrderedHashIterator_pmc_hash(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_OrderedHashIterator_attributes *)PMC_data(pmc))->pmc_hash; \
        } \
        else { \
            (dest) = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "pmc_hash")); \
        } \
    } while (0)
#define SETATTR_OrderedHashIterator_pmc_hash(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "pmc_hash"), value); \
        } \
        else \
            ((Parrot_OrderedHashIterator_attributes *)PMC_data(pmc))->pmc_hash = (value); \
    } while (0)


/* Generated macro accessors for 'next_entry' attribute of OrderedHashIterator PMC. */
#define GETATTR_OrderedHashIterator_next_entry(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_OrderedHashIterator_attributes *)PMC_data(pmc))->next_entry; \
        } \
        else { \
            (dest) = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "next_entry")); \
        } \
    } while (0)
#define SETATTR_OrderedHashIterator_next_entry(interp, pmc, value) \
    do { \
        if (PObj_is_object_TEST(pmc)) { \
            VTABLE_set_attr_str(interp, pmc, \
                              Parrot_str_new_constant(interp, "next_entry"), value); \
        } \
        else \
            ((Parrot_OrderedHashIterator_attributes *)PMC_data(pmc))->next_entry = (value); \
    } while (0)


/* Generated macro accessors for 'pos' attribute of OrderedHashIterator PMC. */
#define GETATTR_OrderedHashIterator_pos(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_OrderedHashIterator_attributes *)PMC_data(pmc))->pos; \
        } \
        else { \
            PMC * const attr_value = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "pos")); \
            (dest) = (PMC_IS_NULL(attr_value) ? (INTVAL) 0: VTABLE_get_integer(interp, attr_value)); \
        } \
    } while (0)
#define SETATTR_OrderedHashIterator_pos(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, "pos"), attr_value); \
        } \
        else \
            ((Parrot_OrderedHashIterator_attributes *)PMC_data(pmc))->pos = (value); \
    } while (0)


/* Generated macro accessors for 'elements' attribute of OrderedHashIterator PMC. */
#define GETATTR_OrderedHashIterator_elements(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_OrderedHashIterator_attributes *)PMC_data(pmc))->elements; \
        } \
        else { \
            PMC * const attr_value = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "elements")); \
            (dest) = (PMC_IS_NULL(attr_value) ? (INTVAL) 0: VTABLE_get_integer(interp, attr_value)); \
        } \
    } while (0)
#define SETATTR_OrderedHashIterator_elements(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, "elements"), attr_value); \
        } \
        else \
            ((Parrot_OrderedHashIterator_attributes *)PMC_data(pmc))->elements = (value); \
    } while (0)


/* Generated macro accessors for 'reverse' attribute of OrderedHashIterator PMC. */
#define GETATTR_OrderedHashIterator_reverse(interp, pmc, dest) \
    do { \
        if (!PObj_is_object_TEST(pmc)) { \
            (dest) = ((Parrot_OrderedHashIterator_attributes *)PMC_data(pmc))->reverse; \
        } \
        else { \
            PMC * const attr_value = VTABLE_get_attr_str(interp, \
                              pmc, Parrot_str_new_constant(interp, "reverse")); \
            (dest) = (PMC_IS_NULL(attr_value) ? (INTVAL) 0: VTABLE_get_integer(interp, attr_value)); \
        } \
    } while (0)
#define SETATTR_OrderedHashIterator_reverse(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, "reverse"), attr_value); \
        } \
        else \
            ((Parrot_OrderedHashIterator_attributes *)PMC_data(pmc))->reverse = (value); \
    } while (0)


#endif /* PARROT_PMC_ORDEREDHASHITERATOR_H_GUARD */

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

