[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

SAX/C++: GCJ and CNI

  • From: David Brownell <david-b@p...>
  • To: xml-dev@i...
  • Date: Tue, 28 Dec 1999 14:16:43 -0800

xml sax c
I've not been closely following this discussion, but I don't think
that one interesting point got raised yet.

That point being that a side effect of the "GNU Compiler for Java"
(GCJ -- see http://sourceware.cygnus.com) such a binding is more or
less defined automatically from the Java binding.  For some folk this
may suffice ... there _will_ be multiple SAX/C++ bindings.

Look at the GCJ and LIBGCJ pages for more information if this sounds
at all interesting.  "CNI" is the binding; it's much lighter weight
than JNI (which has been known to kill all performance advantages of
using native code due to its call overhead).  It's a goal to have C++
and Java code interwork as smoothly as C++ and C do.

A sample CNI interface is included below.

If you go to my XML page (http://home.pacbell.net/david-b/xml/) you'll
see everything is set up to work with GCJ.  To try it now, you should feel
comfortable compiling GCJ (compiler and runtime!) from source, have the
bandwidth to download ~15Mb source snapshots, and cope with the bugs.

For the record, when I've run GCJ it's been mostly faster than Sun's
JVM (including x86 JIT), but not always.  Yes, folk are hard at work
making this faster, and fixing the bugs.  (And as always, help is much
appreciated.)  GCC/EGCS 2.96 should be very interesting!!

- Dave


// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-

#ifndef __org_xml_sax_DocumentHandler__
#define __org_xml_sax_DocumentHandler__

#pragma interface

#include <java/lang/Object.h>
#include <gcj/array.h>

extern "Java"
{
  namespace org
  {
    namespace xml
    {
      namespace sax
      {
        class DocumentHandler;
        class AttributeList;
        class Locator;
      }
    }
  }
};

class ::org::xml::sax::DocumentHandler : public ::java::lang::Object
{
public:
  virtual void characters (jcharArray, jint, jint) = 0;
  virtual void endDocument () = 0;
  virtual void endElement (::java::lang::String *) = 0;
  virtual void ignorableWhitespace (jcharArray, jint, jint) = 0;
  virtual void processingInstruction (::java::lang::String *,
::java::lang::String *) = 0;
  virtual void setDocumentLocator (::org::xml::sax::Locator *) = 0;
  virtual void startDocument () = 0;
  virtual void startElement (::java::lang::String *,
::org::xml::sax::AttributeList *) = 0;
};

#endif /* __org_xml_sax_DocumentHandler__ */

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@i... the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2011 All Rights Reserved.