# This file was automatically generated by SWIG (http://www.swig.org).
# Version 1.3.38
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

package stfl;
use base qw(Exporter);
use base qw(DynaLoader);
package stflc;
bootstrap stfl;
package stfl;
@EXPORT = qw();

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

package stfl;

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

*create = *stflc::create;
*run = *stflc::run;
*get = *stflc::get;
*set = *stflc::set;
*get_focus = *stflc::get_focus;
*set_focus = *stflc::set_focus;
*quote = *stflc::quote;
*dump = *stflc::dump;
*modify = *stflc::modify;
*lookup = *stflc::lookup;
*error = *stflc::error;
*error_action = *stflc::error_action;
*reset = *stflc::reset;

############# Class : stfl::stfl_form ##############

package stfl::stfl_form;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( stfl );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = stflc::new_stfl_form(@_);
    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}) {
        stflc::delete_stfl_form($self);
        delete $OWNER{$self};
    }
}

*run = *stflc::stfl_form_run;
*get = *stflc::stfl_form_get;
*set = *stflc::stfl_form_set;
*get_focus = *stflc::stfl_form_get_focus;
*set_focus = *stflc::stfl_form_set_focus;
*dump = *stflc::stfl_form_dump;
*modify = *stflc::stfl_form_modify;
*lookup = *stflc::stfl_form_lookup;
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 stfl;

1;
