# This file was automatically generated by SWIG
package Math::Macopt;
require Exporter;
require DynaLoader;
@ISA = qw(Exporter DynaLoader);
package Math::Macoptc;
bootstrap Math::Macopt;
package Math::Macopt;
@EXPORT = qw( );

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

package Math::Macopt;

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 Math::Macopt;


############# Class : Math::Macopt::Base ##############

package Math::Macopt::Base;
@ISA = qw( Math::Macopt );
%OWNER = ();
%ITERATORS = ();
sub new {
    my $pkg = shift;
    my $self = Math::Macoptc::new_Base(@_);
    bless $self, $pkg if defined($self);
}

*macoptII = *Math::Macoptc::Base_macoptII;
*maccheckgrad = *Math::Macoptc::Base_maccheckgrad;
*size = *Math::Macoptc::Base_size;
*setFunc = *Math::Macoptc::Base_setFunc;
*setDfunc = *Math::Macoptc::Base_setDfunc;
sub DESTROY {
    return unless $_[0]->isa('HASH');
    my $self = tied(%{$_[0]});
    return unless defined $self;
    delete $ITERATORS{$self};
    if (exists $OWNER{$self}) {
        Math::Macoptc::delete_Base($self);
        delete $OWNER{$self};
    }
}

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 Math::Macopt;

1;
