/*
Copyright (C) 2006-2008, The Perl Foundation.
$Id: /mirror/trunk/languages/WMLScript/pmc/wmlsinvalid.pmc 34379 2008-12-25T15:52:38.013371Z fperrad  $

=head1 NAME

pmc/wmlsinvalid.pmc - WMLScript Invalid

=head1 DESCRIPTION

C<WmlsInvalid> extends C<Undef> to provide a class with the behaviour of
the WMLScript C<Invalid> type.

=head2 Methods

=over 4

=cut

*/

#include "parrot/embed.h"

static INTVAL dynpmc_WmlsBoolean;
static INTVAL dynpmc_WmlsInteger;
static INTVAL dynpmc_WmlsInvalid;

pmclass WmlsInvalid
    extends Undef
    provides scalar
    dynpmc
    group wmls_group
    hll wmlscript maps Undef {

/* Class initialization. Caches constant strings that will be used later.
*/
    void class_init() {
        if (pass) {
            dynpmc_WmlsBoolean = pmc_type(INTERP,
              const_string(INTERP, "WmlsBoolean"));
            dynpmc_WmlsInteger = pmc_type(INTERP,
              const_string(INTERP, "WmlsInteger"));
            dynpmc_WmlsInvalid = pmc_type(INTERP,
              const_string(INTERP, "WmlsInvalid"));
        }
    }

/*

=item C<PMC *clone()>

=cut

*/
    VTABLE PMC* clone() {
        return pmc_new(INTERP, dynpmc_WmlsInvalid);
    }

/*

=item C<PMC* get_class()>

Return the integer 4.

=cut

*/
    VTABLE PMC* get_class() {
        PMC* retval = pmc_new(interp, dynpmc_WmlsInteger);
        PMC_int_val(retval) = 4;
        return retval;
    }

/*

=item C<STRING* get_string()>

Return the string "invalid".

=cut

*/
    VTABLE STRING* get_string() {
        return const_string(INTERP, "invalid");
    }

/*

=item C<void increment()>

=cut

*/
    VTABLE void increment() {
        return;
    }

/*

=item C<void decrement()>

=cut

*/
    VTABLE void decrement() {
        return;
    }

/*

=item C<PMC* absolute(PMC *dest)>

=item C<void i_absolute()>

=cut

*/
    VTABLE PMC* absolute(PMC* dest) {
        return pmc_new(INTERP, dynpmc_WmlsInvalid);
    }

    VTABLE void i_absolute() {
        return;
    }

/*

=item C<PMC* neg(PMC *dest)>

=item C<void i_neg()>

=cut

*/
    VTABLE PMC* neg(PMC* dest) {
        return pmc_new(INTERP, dynpmc_WmlsInvalid);
    }

    VTABLE void i_neg() {
        return;
    }

/*

=item C<PMC* bitwise_not(PMC *dest)>

=item C<void i_bitwise_not()>

=cut

*/
    VTABLE PMC* bitwise_not(PMC* dest) {
        return pmc_new(INTERP, dynpmc_WmlsInvalid);
    }

    VTABLE void i_bitwise_not() {
        return;
    }

/*

=item C<PMC* logical_not(PMC *dest)>

=item C<void i_logical_not()>

=cut

*/
    VTABLE PMC* logical_not(PMC* dest) {
        return pmc_new(INTERP, dynpmc_WmlsInvalid);
    }

    VTABLE void i_logical_not() {
        return;
    }

/*

=back

=head2 non-Vtable Methods

=over 4

=item C<void add(PMC *value, PMC *dest)>

=item C<void i_add(PMC *value)>

=cut

*/
    PMC* add(PMC* value, PMC* dest) {
        return pmc_new(INTERP, dynpmc_WmlsInvalid);
    }

    void i_add(PMC* value) {
        return;
    }

/*

=item C<PMC* subtract(PMC *value, PMC *dest)>

=item C<void i_subtract(PMC *value)>

=cut

*/
    PMC* subtract(PMC* value, PMC* dest) {
        return pmc_new(INTERP, dynpmc_WmlsInvalid);
    }

    void i_subtract(PMC* value) {
        return;
    }

/*

=item C<PMC* multiply(PMC *value, PMC *dest)>

=item C<void i_multiply(PMC *value)>

=cut

*/
    PMC* multiply(PMC* value, PMC* dest) {
        return pmc_new(INTERP, dynpmc_WmlsInvalid);
    }

    void i_multiply(PMC* value) {
        return;
    }

/*

=item C<PMC* divide(PMC *value, PMC *dest)>

=item C<void i_divide(PMC *value)>

=cut

*/
    PMC* divide(PMC* value, PMC* dest) {
        return pmc_new(INTERP, dynpmc_WmlsInvalid);
    }

    void i_divide(PMC* value) {
        return;
    }

/*

=item C<PMC* floor_divide(PMC *value, PMC *dest)>

=item C<void i_floor_divide(PMC *value)>

=cut

*/
    PMC* floor_divide(PMC* value, PMC* dest) {
        return pmc_new(INTERP, dynpmc_WmlsInvalid);
    }

    void i_floor_divide(PMC* value) {
        return;
    }

/*

=item C<PMC* modulus(PMC *value, PMC *dest)>

=item C<void i_modulus(PMC *value)>

=cut

*/
    PMC* modulus(PMC* value, PMC* dest) {
        return pmc_new(INTERP, dynpmc_WmlsInvalid);
    }

    void i_modulus(PMC* value) {
        return;
    }

/*

=item C<PMC* bitwise_or(PMC *value, PMC *dest)>

=item C<void i_bitwise_or(PMC *value)>

=cut

*/
    VTABLE PMC* bitwise_or(PMC* value, PMC* dest) {
        return pmc_new(INTERP, dynpmc_WmlsInvalid);
    }

    VTABLE void i_bitwise_or(PMC* value) {
        return;
    }

/*

=item C<PMC* bitwise_and(PMC *value, PMC *dest)>

=item C<void i_bitwise_and(PMC *value)>

=cut

*/
    VTABLE PMC* bitwise_and(PMC* value, PMC* dest) {
        return pmc_new(INTERP, dynpmc_WmlsInvalid);
    }

    VTABLE void i_bitwise_and(PMC* value) {
        return;
    }

/*

=item C<void bitwise_xor(PMC *value, PMC *dest)>

=item C<void i_bitwise_xor(PMC *value)>

=cut

*/
    VTABLE PMC* bitwise_xor(PMC* value, PMC* dest) {
        return pmc_new(INTERP, dynpmc_WmlsInvalid);
    }

    VTABLE void i_bitwise_xor(PMC* value) {
        return;
    }

/*

=item C<PMC* bitwise_shr(PMC *value, PMC *dest)>

=item C<void i_bitwise_shr(PMC *value)>

=cut

*/
    VTABLE PMC* bitwise_shr(PMC* value, PMC* dest) {
        return pmc_new(INTERP, dynpmc_WmlsInvalid);
    }

    VTABLE void i_bitwise_shr(PMC* value) {
        return;
    }

/*

=item C<PMC* bitwise_lsr(PMC *value, PMC *dest)>

=item C<void i_bitwise_lsr(PMC *value)>

=cut

*/
    VTABLE PMC* bitwise_lsr(PMC* value, PMC* dest) {
        return pmc_new(INTERP, dynpmc_WmlsInvalid);
    }

    VTABLE void i_bitwise_lsr(PMC* value) {
        return;
    }

/*

=item C<PMC* bitwise_shl(PMC *value, PMC *dest)>

=item C<void i_bitwise_shl(PMC *value)>

=cut

*/
    VTABLE PMC* bitwise_shl(PMC* value, PMC* dest) {
        return pmc_new(INTERP, dynpmc_WmlsInvalid);
    }

    VTABLE void i_bitwise_shl(PMC* value) {
        return;
    }

/*

=item C<PMC* is_equal(PMC* value)>

=cut

*/
    MULTI INTVAL is_equal(DEFAULT value) {
        return 4;
    }

/*

=item C<PMC* cmp(PMC *value)>

=cut

*/
    MULTI INTVAL cmp(DEFAULT value) {
        return 4;
    }

}

/*

=back

=cut

*/


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