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

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

package EST_Relation;

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 EST_Relation;

*copy_relation = *EST_Relationc::copy_relation;

############# Class : EST_Relation::EST_Relation ##############

package EST_Relation::EST_Relation;
@ISA = qw( EST_Relation );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = EST_Relationc::new_EST_Relation(@_);
    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}) {
        EST_Relationc::delete_EST_Relation($self);
        delete $OWNER{$self};
    }
}

*load = *EST_Relationc::EST_Relation_load;
*save = *EST_Relationc::EST_Relation_save;
*evaluate_item_features = *EST_Relationc::EST_Relation_evaluate_item_features;
*clear = *EST_Relationc::EST_Relation_clear;
*utt = *EST_Relationc::EST_Relation_utt;
*set_utt = *EST_Relationc::EST_Relation_set_utt;
*name = *EST_Relationc::EST_Relation_name;
*head = *EST_Relationc::EST_Relation_head;
*root = *EST_Relationc::EST_Relation_root;
*tail = *EST_Relationc::EST_Relation_tail;
*first = *EST_Relationc::EST_Relation_first;
*first_leaf = *EST_Relationc::EST_Relation_first_leaf;
*last = *EST_Relationc::EST_Relation_last;
*last_leaf = *EST_Relationc::EST_Relation_last_leaf;
*append = *EST_Relationc::EST_Relation_append;
*prepend = *EST_Relationc::EST_Relation_prepend;
*length = *EST_Relationc::EST_Relation_length;
*empty = *EST_Relationc::EST_Relation_empty;
*remove_item = *EST_Relationc::EST_Relation_remove_item;
*remove_item_feature = *EST_Relationc::EST_Relation_remove_item_feature;
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 EST_Relation;

1;
