Unicorn XML Toolkit
Version 1.00.00

Namespace EcmaScriptDom
Class CDocumentFactory

class CDocumentFactory: public CInterface {
public:
    CDocumentFactory();
    virtual ~CDocumentFactory();
public:
    virtual XDocument CreateDocument() = 0;
    virtual XDocument CreateDocument(
        const CString &strImplementation) = 0;
    };

The factory for DOM documents.

This class represents an abstract interface to DOM document factories. Applications are required to provide implementation of this class.

An application must supply an object of this class when the the DOM Extension is registered with the ECMAScript interpreter by CDomExtension::Register function. Functions of the document factory are called when creation of a new DOM document is requested by an ECMAScript program.

A document factory may support one or more DOM implementations, one of which must be designated as the default. Each DOM implementation must have the unique name. When creation of a new DOM document is requested, the name of the required DOM implementation may be supplied; if this name is omitted, the default DOM implementation is assumed.

Since:
1.00.00
Version:
1.00.00
Author:
Alexey Gokhberg
See Also:
Dom::IDocument
Constructor/Destructor Summary
CDocumentFactory ();
����������Constructs the document factory.
~CDocumentFactory ();
����������Destroys the document factory.

Function Summary
XDocument CreateDocument ();
����������Creates a new document using the default DOM implementation.
XDocument CreateDocument (const CString &strImplementation);
����������Creates a new document using the specified DOM implementation.

Constructor/Destructor Detail

CDocumentFactory

CDocumentFactory();

Constructs the document factory.

~CDocumentFactory

virtual ~CDocumentFactory();

Destroys the document factory.

Function Detail

CreateDocument

virtual XDocument CreateDocument() = 0;

Creates a new document using the default DOM implementation.

Returns:
the newly created document

CreateDocument

virtual XDocument CreateDocument(
    const CString &strImplementation) = 0;

Creates a new document using the specified DOM implementation.

Parameters:
strImplementation - the name of the DOM implementation
Returns:
the newly created document

Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

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