Unicorn XML Toolkit
Version 1.00.00

Namespace EcmaScriptXml
Class CContentHandlerInstance

class CContentHandlerInstance: public CBaseObject {
public:
    CContentHandlerInstance(
        CXmlObject *pXmlObject,
        const XObject &pPrototype,
        const Sax::XContentHandler &pContentHandler=NULL);
    ~CContentHandlerInstance();
public:
    CString Class();
public:
    Sax::XContentHandler GetContentHandler();
    Sax::XContentHandler WrapContentHandler();
    };

The ECMAScript object representing a SAX ContentHandler instance.

Declaration of this class is made public in order to allow development of custom ECMAScript extensions, which provide objects, derived from XML content handlers, (that is, objects, containing XML ContentHandler prototype in their prototype chains and thus implementing properties of XML content handlers). Instances of such extension objects must be implemented using classes derived from CContentHandlerInstance . For example, refer to the source code for the class EcmaScriptDomPrivate::CWriterInstance , implementing DOM writers. This code can be found in the toolkit source distribution, files src\esxdom\domprv.h and src\esxdom\objwri.cpp .

Each ECMAScript content handler instance may be associated with an object of Sax::CContentHandler class; in this case function properties of the XML extension object are initially bound to event processing functions of the associated Sax::CContentHandler instance.

If the associated Sax::CContentHandler instance is not specified, then event processing function properties of the ECMAScript content handler are initialized to void (doing nothing) functions.

Some content handler object classes allow event processing function properties being overriden by ECMAScript programs in order to implement custom event processing.

Since:
1.00.00
Version:
1.00.00
Author:
Alexey Gokhberg
See Also:
CXmlObject, EcmaScript::CObject, Sax::CContentHandler
Constructor/Destructor Summary
CContentHandlerInstance (CXmlObject *pXmlObject, const XObject &pPrototype, const Sax::XContentHandler &pContentHandler=NULL);
����������Constructs the content handler instance.
~CContentHandlerInstance ();
����������Destroys the content handler instance.

Function Summary
CString Class ();
����������Returns the value of the internal [[Class]] property of this object.
Sax::XContentHandler GetContentHandler ();
����������Returns an instance of Sax::CContentHandler associated with this object.
Sax::XContentHandler WrapContentHandler ();
����������Returns an instance of Sax::CContentHandler , which wraps event processing ECMAScript function properties associated with this object.

Constructor/Destructor Detail

CContentHandlerInstance

CContentHandlerInstance(
    CXmlObject *pXmlObject,
    const XObject &pPrototype,
    const Sax::XContentHandler &pContentHandler=NULL);

Constructs the content handler instance.

Parameters:
pXmlObject - the XML root object
pPrototype - the object's prototype (value of the internal [[Prototype]] property for this object)
pContentHandler - the instance of the SAX content handler for this object; NULL if not specified

~CContentHandlerInstance

~CContentHandlerInstance();

Destroys the content handler instance.

Function Detail

Class

CString Class();

Returns the value of the internal [[Class]] property of this object.

This function returns "XML.ContentHandler" . It may be (and usually is) overriden by derived classes.

Returns:
the value of the internal [[Class]] property of this object

GetContentHandler

Sax::XContentHandler GetContentHandler();

Returns an instance of Sax::CContentHandler associated with this object.

Returns:
the SAX content handler instance associated with this object, or NULL if none was specified

WrapContentHandler

Sax::XContentHandler WrapContentHandler();

Returns an instance of Sax::CContentHandler , which wraps event processing ECMAScript function properties associated with this object.

Returns:
the SAX content handler instance, which wraps event processing ECMAScript function properties associated with this object

Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

Copyright 1999-2001 Unicorn Enterprises SA.
All Rights Reserved.