# This file was automatically generated by SWIG
package YamCha;
require Exporter;
require DynaLoader;
@ISA = qw(Exporter DynaLoader);
package YamChac;
bootstrap YamCha;
package YamCha;
@EXPORT = qw( );

# ---------- BASE METHODS -------------

package YamCha;

sub TIEHASH {
    my ($classname,$obj) = @_;
    return bless $obj, $classname;
}

sub CLEAR { }

sub FIRSTKEY { }

sub NEXTKEY { }

sub FETCH {
    my ($self,$field) = @_;
    my $member_func = "swig_${field}_get";
    $self->$member_func();
}

sub STORE {
    my ($self,$field,$newval) = @_;
    my $member_func = "swig_${field}_set";
    $self->$member_func($newval);
}

sub this {
    my $ptr = shift;
    return tied(%$ptr);
}


# ------- FUNCTION WRAPPERS --------

package YamCha;


############# Class : YamCha::Chunker ##############

package YamCha::Chunker;
@ISA = qw( YamCha );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = YamChac::new_Chunker(@_);
    bless $self, $pkg if defined($self);
}

sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        YamChac::delete_Chunker($self);
        delete $OWNER{$self};
    }
}

*parse = *YamChac::Chunker_parse;
*parseToString = *YamChac::Chunker_parseToString;
sub DISOWN {
    my $self = shift;
    my $ptr = tied(%$self);
    delete $OWNER{$ptr};
}

sub ACQUIRE {
    my $self = shift;
    my $ptr = tied(%$self);
    $OWNER{$ptr} = 1;
}


# ------- VARIABLE STUBS --------

package YamCha;

1;
