You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ja...@apache.org on 2006/10/13 23:23:04 UTC

svn commit: r463839 [1/4] - in /xerces/c/trunk/swig/perl: IO/ IO/IO.pm IO/Makefile.PL IO/Xerces_IO.cpp SAX/ SAX/Makefile.PL SAX/SAX.pm SAX/Xerces_SAX.cpp

Author: jasons
Date: Fri Oct 13 14:23:03 2006
New Revision: 463839

URL: http://svn.apache.org/viewvc?view=rev&rev=463839
Log:
new sub-modules

Added:
    xerces/c/trunk/swig/perl/IO/   (with props)
    xerces/c/trunk/swig/perl/IO/IO.pm
    xerces/c/trunk/swig/perl/IO/Makefile.PL
      - copied, changed from r442160, xerces/c/trunk/swig/perl/DOM/Makefile.PL
    xerces/c/trunk/swig/perl/IO/Xerces_IO.cpp
    xerces/c/trunk/swig/perl/SAX/   (with props)
    xerces/c/trunk/swig/perl/SAX/Makefile.PL
      - copied, changed from r442160, xerces/c/trunk/swig/perl/DOM/Makefile.PL
    xerces/c/trunk/swig/perl/SAX/SAX.pm
    xerces/c/trunk/swig/perl/SAX/Xerces_SAX.cpp

Propchange: xerces/c/trunk/swig/perl/IO/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Oct 13 14:23:03 2006
@@ -0,0 +1,6 @@
+IO-tmp.pm
+IO.bs
+Makefile.old
+Makefile
+Xerces_IO-tmp.cpp
+pm_to_blib

Added: xerces/c/trunk/swig/perl/IO/IO.pm
URL: http://svn.apache.org/viewvc/xerces/c/trunk/swig/perl/IO/IO.pm?view=auto&rev=463839
==============================================================================
--- xerces/c/trunk/swig/perl/IO/IO.pm (added)
+++ xerces/c/trunk/swig/perl/IO/IO.pm Fri Oct 13 14:23:03 2006
@@ -0,0 +1,445 @@
+ #
+ # Copyright 2002,2004 The Apache Software Foundation.
+ #
+ # Licensed under the Apache License, Version 2.0 (the "License");
+ # you may not use this file except in compliance with the License.
+ # You may obtain a copy of the License at
+ #
+ #      http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an "AS IS" BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+ #
+
+# This file was created automatically by SWIG 1.3.30.
+# Don't modify this file, modify the SWIG interface instead.
+package XML::Xerces::IO;
+use base qw(DynaLoader);
+require XML::Xerces;
+bootstrap XML::Xerces::IO;
+package XML::Xerces::IO;
+package XML::Xerces::IO;
+
+# ------- FUNCTION WRAPPERS --------
+
+package XML::Xerces;
+
+
+############# Class : XML::Xerces::InputSource ##############
+
+package XML::Xerces::InputSource;
+use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
+@ISA = qw( XML::Xerces );
+%OWNER = ();
+%ITERATORS = ();
+sub DESTROY {
+    return unless $_[0]->isa('HASH');
+    my $self = tied(%{$_[0]});
+    return unless defined $self;
+    delete $ITERATORS{$self};
+    if (exists $OWNER{$self}) {
+        XML::Xercesc::delete_InputSource($self);
+        delete $OWNER{$self};
+    }
+}
+
+*makeStream = *XML::Xercesc::InputSource_makeStream;
+*getEncoding = *XML::Xercesc::InputSource_getEncoding;
+*getPublicId = *XML::Xercesc::InputSource_getPublicId;
+*getSystemId = *XML::Xercesc::InputSource_getSystemId;
+*getIssueFatalErrorIfNotFound = *XML::Xercesc::InputSource_getIssueFatalErrorIfNotFound;
+*getMemoryManager = *XML::Xercesc::InputSource_getMemoryManager;
+*setEncoding = *XML::Xercesc::InputSource_setEncoding;
+*setPublicId = *XML::Xercesc::InputSource_setPublicId;
+*setSystemId = *XML::Xercesc::InputSource_setSystemId;
+*setIssueFatalErrorIfNotFound = *XML::Xercesc::InputSource_setIssueFatalErrorIfNotFound;
+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 : XML::Xerces::LocalFileInputSource ##############
+
+package XML::Xerces::LocalFileInputSource;
+use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
+@ISA = qw( XML::Xerces::InputSource XML::Xerces );
+%OWNER = ();
+%ITERATORS = ();
+sub new {
+    my $pkg = shift;
+    my $self = XML::Xercesc::new_LocalFileInputSource(@_);
+    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}) {
+        XML::Xercesc::delete_LocalFileInputSource($self);
+        delete $OWNER{$self};
+    }
+}
+
+*makeStream = *XML::Xercesc::LocalFileInputSource_makeStream;
+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 : XML::Xerces::StdInInputSource ##############
+
+package XML::Xerces::StdInInputSource;
+use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
+@ISA = qw( XML::Xerces::InputSource XML::Xerces );
+%OWNER = ();
+%ITERATORS = ();
+sub new {
+    my $pkg = shift;
+    my $self = XML::Xercesc::new_StdInInputSource(@_);
+    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}) {
+        XML::Xercesc::delete_StdInInputSource($self);
+        delete $OWNER{$self};
+    }
+}
+
+*makeStream = *XML::Xercesc::StdInInputSource_makeStream;
+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 : XML::Xerces::URLInputSource ##############
+
+package XML::Xerces::URLInputSource;
+use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
+@ISA = qw( XML::Xerces::InputSource XML::Xerces );
+%OWNER = ();
+%ITERATORS = ();
+sub new {
+    my $pkg = shift;
+    my $self = XML::Xercesc::new_URLInputSource(@_);
+    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}) {
+        XML::Xercesc::delete_URLInputSource($self);
+        delete $OWNER{$self};
+    }
+}
+
+*makeStream = *XML::Xercesc::URLInputSource_makeStream;
+*urlSrc = *XML::Xercesc::URLInputSource_urlSrc;
+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 : XML::Xerces::MemBufInputSource ##############
+
+package XML::Xerces::MemBufInputSource;
+use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
+@ISA = qw( XML::Xerces::InputSource XML::Xerces );
+%OWNER = ();
+%ITERATORS = ();
+sub new {
+  my $pkg = shift;
+  # SYSTEM ID is *optional*
+  if (scalar @_ == 1) {
+    push(@_,'FAKE_SYSTEM_ID');
+  }
+
+  my $self = XML::Xercesc::new_MemBufInputSource(@_);
+    
+  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}) {
+        XML::Xercesc::delete_MemBufInputSource($self);
+        delete $OWNER{$self};
+    }
+}
+
+*makeStream = *XML::Xercesc::MemBufInputSource_makeStream;
+*setCopyBufToStream = *XML::Xercesc::MemBufInputSource_setCopyBufToStream;
+*resetMemBufInputSource = *XML::Xercesc::MemBufInputSource_resetMemBufInputSource;
+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 : XML::Xerces::XMLFormatter ##############
+
+package XML::Xerces::XMLFormatter;
+use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
+@ISA = qw( XML::Xerces );
+%OWNER = ();
+%ITERATORS = ();
+*NoEscapes = *XML::Xercesc::XMLFormatter_NoEscapes;
+*StdEscapes = *XML::Xercesc::XMLFormatter_StdEscapes;
+*AttrEscapes = *XML::Xercesc::XMLFormatter_AttrEscapes;
+*CharEscapes = *XML::Xercesc::XMLFormatter_CharEscapes;
+*EscapeFlags_Count = *XML::Xercesc::XMLFormatter_EscapeFlags_Count;
+*DefaultEscape = *XML::Xercesc::XMLFormatter_DefaultEscape;
+*UnRep_Fail = *XML::Xercesc::XMLFormatter_UnRep_Fail;
+*UnRep_CharRef = *XML::Xercesc::XMLFormatter_UnRep_CharRef;
+*UnRep_Replace = *XML::Xercesc::XMLFormatter_UnRep_Replace;
+*DefaultUnRep = *XML::Xercesc::XMLFormatter_DefaultUnRep;
+sub new {
+    my $pkg = shift;
+    my $self = XML::Xercesc::new_XMLFormatter(@_);
+    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}) {
+        XML::Xercesc::delete_XMLFormatter($self);
+        delete $OWNER{$self};
+    }
+}
+
+*formatBuf = *XML::Xercesc::XMLFormatter_formatBuf;
+*writeBOM = *XML::Xercesc::XMLFormatter_writeBOM;
+*getEncodingName = *XML::Xercesc::XMLFormatter_getEncodingName;
+*getTranscoder = *XML::Xercesc::XMLFormatter_getTranscoder;
+*setEscapeFlags = *XML::Xercesc::XMLFormatter_setEscapeFlags;
+*setUnRepFlags = *XML::Xercesc::XMLFormatter_setUnRepFlags;
+*__lshift__ = *XML::Xercesc::XMLFormatter___lshift__;
+*getEscapeFlags = *XML::Xercesc::XMLFormatter_getEscapeFlags;
+*getUnRepFlags = *XML::Xercesc::XMLFormatter_getUnRepFlags;
+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 : XML::Xerces::XMLFormatTarget ##############
+
+package XML::Xerces::XMLFormatTarget;
+use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
+@ISA = qw( XML::Xerces );
+%OWNER = ();
+%ITERATORS = ();
+sub DESTROY {
+    return unless $_[0]->isa('HASH');
+    my $self = tied(%{$_[0]});
+    return unless defined $self;
+    delete $ITERATORS{$self};
+    if (exists $OWNER{$self}) {
+        XML::Xercesc::delete_XMLFormatTarget($self);
+        delete $OWNER{$self};
+    }
+}
+
+*writeChars = *XML::Xercesc::XMLFormatTarget_writeChars;
+*flush = *XML::Xercesc::XMLFormatTarget_flush;
+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 : XML::Xerces::StdOutFormatTarget ##############
+
+package XML::Xerces::StdOutFormatTarget;
+use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
+@ISA = qw( XML::Xerces::XMLFormatTarget XML::Xerces );
+%OWNER = ();
+%ITERATORS = ();
+sub new {
+    my $pkg = shift;
+    my $self = XML::Xercesc::new_StdOutFormatTarget(@_);
+    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}) {
+        XML::Xercesc::delete_StdOutFormatTarget($self);
+        delete $OWNER{$self};
+    }
+}
+
+*writeChars = *XML::Xercesc::StdOutFormatTarget_writeChars;
+*flush = *XML::Xercesc::StdOutFormatTarget_flush;
+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 : XML::Xerces::LocalFileFormatTarget ##############
+
+package XML::Xerces::LocalFileFormatTarget;
+use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
+@ISA = qw( XML::Xerces::XMLFormatTarget XML::Xerces );
+%OWNER = ();
+%ITERATORS = ();
+sub new {
+    my $pkg = shift;
+    my $self = XML::Xercesc::new_LocalFileFormatTarget(@_);
+    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}) {
+        XML::Xercesc::delete_LocalFileFormatTarget($self);
+        delete $OWNER{$self};
+    }
+}
+
+*writeChars = *XML::Xercesc::LocalFileFormatTarget_writeChars;
+*flush = *XML::Xercesc::LocalFileFormatTarget_flush;
+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 : XML::Xerces::MemBufFormatTarget ##############
+
+package XML::Xerces::MemBufFormatTarget;
+use vars qw(@ISA %OWNER %ITERATORS %BLESSEDMEMBERS);
+@ISA = qw( XML::Xerces::XMLFormatTarget XML::Xerces );
+%OWNER = ();
+%ITERATORS = ();
+sub new {
+    my $pkg = shift;
+    my $self = XML::Xercesc::new_MemBufFormatTarget(@_);
+    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}) {
+        XML::Xercesc::delete_MemBufFormatTarget($self);
+        delete $OWNER{$self};
+    }
+}
+
+*writeChars = *XML::Xercesc::MemBufFormatTarget_writeChars;
+*getRawBuffer = *XML::Xercesc::MemBufFormatTarget_getRawBuffer;
+*getLen = *XML::Xercesc::MemBufFormatTarget_getLen;
+*reset = *XML::Xercesc::MemBufFormatTarget_reset;
+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 XML::Xerces;
+
+1;

Copied: xerces/c/trunk/swig/perl/IO/Makefile.PL (from r442160, xerces/c/trunk/swig/perl/DOM/Makefile.PL)
URL: http://svn.apache.org/viewvc/xerces/c/trunk/swig/perl/IO/Makefile.PL?view=diff&rev=463839&p1=xerces/c/trunk/swig/perl/DOM/Makefile.PL&r1=442160&p2=xerces/c/trunk/swig/perl/IO/Makefile.PL&r2=463839
==============================================================================
--- xerces/c/trunk/swig/perl/DOM/Makefile.PL (original)
+++ xerces/c/trunk/swig/perl/IO/Makefile.PL Fri Oct 13 14:23:03 2006
@@ -20,36 +20,36 @@
 if ($XERCES_DEVEL) {
   print STDERR "\tWelcome Xerces Developer!\n";
 
-  sub Xerces_DOM_postamble {
+  sub Xerces_IO_postamble {
     my $retval = <<TERMINUS;
-DOM-tmp.pm: $SCRIPTS_DIR/postModule.pl $INTERFACE_DIR/Perl/dom-shadow.i
-	\$(SWIG) $SWIG_ARGS -o Xerces_DOM-tmp.cpp -pm DOM-tmp.pm $INTERFACE_DIR/Xerces_DOM.i
+IO-tmp.pm: $SCRIPTS_DIR/postModule.pl $INTERFACE_DIR/Perl/dom-shadow.i
+	\$(SWIG) $SWIG_ARGS -o Xerces_IO-tmp.cpp -pm IO-tmp.pm $INTERFACE_DIR/Xerces_IO.i
 
-DOM.pm: $SCRIPTS_DIR/postModule.pl DOM-tmp.pm
-	perl -I$SCRIPTS_DIR $SCRIPTS_DIR/postModule.pl --in=DOM-tmp.pm --out=DOM.pm
+IO.pm: $SCRIPTS_DIR/postModule.pl IO-tmp.pm
+	perl -I$SCRIPTS_DIR $SCRIPTS_DIR/postModule.pl --in=IO-tmp.pm --out=IO.pm
 
-Xerces_DOM.cpp: $SCRIPTS_DIR/postSource.pl Xerces_DOM-tmp.cpp
-	perl -I$SCRIPTS_DIR $SCRIPTS_DIR/postSource.pl --in=Xerces_DOM-tmp.cpp --out=Xerces_DOM.cpp
+Xerces_IO.cpp: $SCRIPTS_DIR/postSource.pl Xerces_IO-tmp.cpp
+	perl -I$SCRIPTS_DIR $SCRIPTS_DIR/postSource.pl --in=Xerces_IO-tmp.cpp --out=Xerces_IO.cpp
 
-Xerces_DOM-tmp.cpp: $INTERFACE_DIR/Xerces_DOM.i
-	\$(SWIG) $SWIG_ARGS -o Xerces_DOM-tmp.cpp -pm DOM-tmp.pm $INTERFACE_DIR/Xerces_DOM.i
-	perl  -I$SCRIPTS_DIR $SCRIPTS_DIR/postModule.pl --in=DOM-tmp.pm --out=DOM.pm
+Xerces_IO-tmp.cpp: $INTERFACE_DIR/Xerces_IO.i @IO_INTERFACE_FILES
+	\$(SWIG) $SWIG_ARGS -o Xerces_IO-tmp.cpp -pm IO-tmp.pm $INTERFACE_DIR/Xerces_IO.i
+	perl  -I$SCRIPTS_DIR $SCRIPTS_DIR/postModule.pl --in=IO-tmp.pm --out=IO.pm
 	mkdir -p $BLIB_DIR
-	cp -f DOM.pm $BLIB_DIR/DOM.pm
+	cp -f IO.pm $BLIB_DIR/IO.pm
 
 TERMINUS
     return $retval;
   }
 
-  *MY::postamble = \&Xerces_DOM_postamble;
+  *MY::postamble = \&Xerces_IO_postamble;
 }
 
 WriteMakefile(
-    'NAME'        => 'XML::Xerces::DOM',
+    'NAME'        => 'XML::Xerces::IO',
     'INC'       => $INCLUDES,
     'LIBS'      => [$LIBS],
     'MYEXTLIB'  => "$TRANSCODER_LIB $HANDLER_LIB",
-    'OBJECT'    => 'Xerces_DOM$(OBJ_EXT)',
+    'OBJECT'    => 'Xerces_IO$(OBJ_EXT)',
     'CCFLAGS'   => $CFLAGS,
     'CC'        => $CXX,
     'SKIP'      => [qw( test makeaperl xs_o)],



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org