package Gnulib::Regex {

# PODNAME: Gnulib::Regex

our $VERSION = '0.003'; # VERSION

# ABSTRACT: Raw perl interface to GNULIB's Regex

our $AUTHORITY = 'cpan:JDDPAUSE'; # AUTHORITY


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

package Gnulib::Regex;
use base qw(Exporter);
use base qw(DynaLoader);
package Gnulib::Regexc;
bootstrap Gnulib::Regex;
package Gnulib::Regex;
@EXPORT = qw();

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

package Gnulib::Regex;

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 Gnulib::Regex;

*re_set_syntax = *Gnulib::Regexc::re_set_syntax;
*re_compile_pattern = *Gnulib::Regexc::re_compile_pattern;
*re_compile_fastmap = *Gnulib::Regexc::re_compile_fastmap;
*re_search = *Gnulib::Regexc::re_search;
*re_search_2 = *Gnulib::Regexc::re_search_2;
*re_match = *Gnulib::Regexc::re_match;
*re_match_2 = *Gnulib::Regexc::re_match_2;
*re_set_registers = *Gnulib::Regexc::re_set_registers;
*regcomp = *Gnulib::Regexc::regcomp;
*regexec = *Gnulib::Regexc::regexec;
*regerror = *Gnulib::Regexc::regerror;
*regfree = *Gnulib::Regexc::regfree;

############# Class : Gnulib::Regex::re_pattern_buffer ##############

package Gnulib::Regex::re_pattern_buffer;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( Gnulib::Regex );
%OWNER = ();
%ITERATORS = ();
*swig_buffer_get = *Gnulib::Regexc::re_pattern_buffer_buffer_get;
*swig_buffer_set = *Gnulib::Regexc::re_pattern_buffer_buffer_set;
*swig_allocated_get = *Gnulib::Regexc::re_pattern_buffer_allocated_get;
*swig_allocated_set = *Gnulib::Regexc::re_pattern_buffer_allocated_set;
*swig_used_get = *Gnulib::Regexc::re_pattern_buffer_used_get;
*swig_used_set = *Gnulib::Regexc::re_pattern_buffer_used_set;
*swig_syntax_get = *Gnulib::Regexc::re_pattern_buffer_syntax_get;
*swig_syntax_set = *Gnulib::Regexc::re_pattern_buffer_syntax_set;
*swig_fastmap_get = *Gnulib::Regexc::re_pattern_buffer_fastmap_get;
*swig_fastmap_set = *Gnulib::Regexc::re_pattern_buffer_fastmap_set;
*swig_translate_get = *Gnulib::Regexc::re_pattern_buffer_translate_get;
*swig_translate_set = *Gnulib::Regexc::re_pattern_buffer_translate_set;
*swig_re_nsub_get = *Gnulib::Regexc::re_pattern_buffer_re_nsub_get;
*swig_re_nsub_set = *Gnulib::Regexc::re_pattern_buffer_re_nsub_set;
*swig_can_be_null_get = *Gnulib::Regexc::re_pattern_buffer_can_be_null_get;
*swig_can_be_null_set = *Gnulib::Regexc::re_pattern_buffer_can_be_null_set;
*swig_regs_allocated_get = *Gnulib::Regexc::re_pattern_buffer_regs_allocated_get;
*swig_regs_allocated_set = *Gnulib::Regexc::re_pattern_buffer_regs_allocated_set;
*swig_fastmap_accurate_get = *Gnulib::Regexc::re_pattern_buffer_fastmap_accurate_get;
*swig_fastmap_accurate_set = *Gnulib::Regexc::re_pattern_buffer_fastmap_accurate_set;
*swig_no_sub_get = *Gnulib::Regexc::re_pattern_buffer_no_sub_get;
*swig_no_sub_set = *Gnulib::Regexc::re_pattern_buffer_no_sub_set;
*swig_not_bol_get = *Gnulib::Regexc::re_pattern_buffer_not_bol_get;
*swig_not_bol_set = *Gnulib::Regexc::re_pattern_buffer_not_bol_set;
*swig_not_eol_get = *Gnulib::Regexc::re_pattern_buffer_not_eol_get;
*swig_not_eol_set = *Gnulib::Regexc::re_pattern_buffer_not_eol_set;
*swig_newline_anchor_get = *Gnulib::Regexc::re_pattern_buffer_newline_anchor_get;
*swig_newline_anchor_set = *Gnulib::Regexc::re_pattern_buffer_newline_anchor_set;
sub new {
    my $pkg = shift;
    my $self = Gnulib::Regexc::new_re_pattern_buffer(@_);
    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}) {
        Gnulib::Regexc::delete_re_pattern_buffer($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;
}


############# Class : Gnulib::Regex::re_registers ##############

package Gnulib::Regex::re_registers;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( Gnulib::Regex );
%OWNER = ();
%ITERATORS = ();
*swig_num_regs_get = *Gnulib::Regexc::re_registers_num_regs_get;
*swig_num_regs_set = *Gnulib::Regexc::re_registers_num_regs_set;
*swig_start_get = *Gnulib::Regexc::re_registers_start_get;
*swig_start_set = *Gnulib::Regexc::re_registers_start_set;
*swig_end_get = *Gnulib::Regexc::re_registers_end_get;
*swig_end_set = *Gnulib::Regexc::re_registers_end_set;
sub new {
    my $pkg = shift;
    my $self = Gnulib::Regexc::new_re_registers(@_);
    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}) {
        Gnulib::Regexc::delete_re_registers($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;
}


############# Class : Gnulib::Regex::regmatch_t ##############

package Gnulib::Regex::regmatch_t;
use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
@ISA = qw( Gnulib::Regex );
%OWNER = ();
%ITERATORS = ();
*swig_rm_so_get = *Gnulib::Regexc::regmatch_t_rm_so_get;
*swig_rm_so_set = *Gnulib::Regexc::regmatch_t_rm_so_set;
*swig_rm_eo_get = *Gnulib::Regexc::regmatch_t_rm_eo_get;
*swig_rm_eo_set = *Gnulib::Regexc::regmatch_t_rm_eo_set;
sub new {
    my $pkg = shift;
    my $self = Gnulib::Regexc::new_regmatch_t(@_);
    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}) {
        Gnulib::Regexc::delete_regmatch_t($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 Gnulib::Regex;

*_REGEX_H = *Gnulib::Regexc::_REGEX_H;
*__USE_GNU = *Gnulib::Regexc::__USE_GNU;
*re_syntax_options = *Gnulib::Regexc::re_syntax_options;
*RE_SYNTAX_EMACS = *Gnulib::Regexc::RE_SYNTAX_EMACS;
*RE_DUP_MAX = *Gnulib::Regexc::RE_DUP_MAX;
*REG_EXTENDED = *Gnulib::Regexc::REG_EXTENDED;
*REG_ICASE = *Gnulib::Regexc::REG_ICASE;
*REG_NEWLINE = *Gnulib::Regexc::REG_NEWLINE;
*REG_NOSUB = *Gnulib::Regexc::REG_NOSUB;
*REG_NOTBOL = *Gnulib::Regexc::REG_NOTBOL;
*REG_NOTEOL = *Gnulib::Regexc::REG_NOTEOL;
*REG_STARTEND = *Gnulib::Regexc::REG_STARTEND;
*_REG_ENOSYS = *Gnulib::Regexc::_REG_ENOSYS;
*_REG_NOERROR = *Gnulib::Regexc::_REG_NOERROR;
*_REG_NOMATCH = *Gnulib::Regexc::_REG_NOMATCH;
*_REG_BADPAT = *Gnulib::Regexc::_REG_BADPAT;
*_REG_ECOLLATE = *Gnulib::Regexc::_REG_ECOLLATE;
*_REG_ECTYPE = *Gnulib::Regexc::_REG_ECTYPE;
*_REG_EESCAPE = *Gnulib::Regexc::_REG_EESCAPE;
*_REG_ESUBREG = *Gnulib::Regexc::_REG_ESUBREG;
*_REG_EBRACK = *Gnulib::Regexc::_REG_EBRACK;
*_REG_EPAREN = *Gnulib::Regexc::_REG_EPAREN;
*_REG_EBRACE = *Gnulib::Regexc::_REG_EBRACE;
*_REG_BADBR = *Gnulib::Regexc::_REG_BADBR;
*_REG_ERANGE = *Gnulib::Regexc::_REG_ERANGE;
*_REG_ESPACE = *Gnulib::Regexc::_REG_ESPACE;
*_REG_BADRPT = *Gnulib::Regexc::_REG_BADRPT;
*_REG_EEND = *Gnulib::Regexc::_REG_EEND;
*_REG_ESIZE = *Gnulib::Regexc::_REG_ESIZE;
*_REG_ERPAREN = *Gnulib::Regexc::_REG_ERPAREN;
*REGS_UNALLOCATED = *Gnulib::Regexc::REGS_UNALLOCATED;
*REGS_REALLOCATE = *Gnulib::Regexc::REGS_REALLOCATE;
*REGS_FIXED = *Gnulib::Regexc::REGS_FIXED;
*RE_NREGS = *Gnulib::Regexc::RE_NREGS;
1;

__END__

=pod

=encoding UTF-8

=head1 NAME

Gnulib::Regex - Raw perl interface to GNULIB's Regex

=head1 VERSION

version 0.003

=head1 DESCRIPTION

This package is a raw interface to GNULIB's Regex function, not intented to be used directly. Please refer to re::engine::GNU instead.

=head1 SEE ALSO

L<re::engine::GNU>

=head1 AUTHOR

Jean-Damien Durand <jeandamiendurand@free.fr>

=head1 COPYRIGHT AND LICENSE

This software is copyright (c) 2015 by Jean-Damien Durand.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.

=cut
