Xerces-C++: DOMLSParser.hpp Source File

- Main Page
- Classes
- Files
- Related Pages

# DOMLSParser.hpp

Go to the documentation of this file.

    00001 /*
    00002  * Licensed to the Apache Software Foundation (ASF) under one or more
    00003  * contributor license agreements.  See the NOTICE file distributed with
    00004  * this work for additional information regarding copyright ownership.
    00005  * The ASF licenses this file to You under the Apache License, Version 2.0
    00006  * (the "License"); you may not use this file except in compliance with
    00007  * the License.  You may obtain a copy of the License at
    00008  *
    00009  *      http://www.apache.org/licenses/LICENSE-2.0
    00010  *
    00011  * Unless required by applicable law or agreed to in writing, software
    00012  * distributed under the License is distributed on an "AS IS" BASIS,
    00013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00014  * See the License for the specific language governing permissions and
    00015  * limitations under the License.
    00016  */
    00017
    00018 /*
    00019  * $Id: DOMLSParser.hpp 671894 2008-06-26 13:29:21Z borisk $
    00020  *
    00021  */
    00022
    00023 #if !defined(XERCESC_INCLUDE_GUARD_DOMLSPARSER_HPP)
    00024 #define XERCESC_INCLUDE_GUARD_DOMLSPARSER_HPP
    00025
    00026 #include <xercesc/dom/DOMConfiguration.hpp>
    00027 #include <xercesc/util/XercesDefs.hpp>
    00028 #include <xercesc/validators/common/Grammar.hpp>
    00029
    00030 XERCES_CPP_NAMESPACE_BEGIN
    00031
    00032
    00033 class DOMErrorHandler;
    00034 class DOMLSInput;
    00035 class DOMLSParserFilter;
    00036 class DOMNode;
    00037 class DOMDocument;
    00038
    00047 class CDOM_EXPORT DOMLSParser
    00048 {
    00049 protected :
    00050     // -----------------------------------------------------------------------
    00051     //  Hidden constructors
    00052     // -----------------------------------------------------------------------
    00055     DOMLSParser() {};
    00057
    00058 private:
    00059     // -----------------------------------------------------------------------
    00060     // Unimplemented constructors and operators
    00061     // -----------------------------------------------------------------------
    00064     DOMLSParser(const DOMLSParser &);
    00065     DOMLSParser & operator = (const DOMLSParser &);
    00067
    00068 public:
    00069     // -----------------------------------------------------------------------
    00070     //  All constructors are hidden, just the destructor is available
    00071     // -----------------------------------------------------------------------
    00078     virtual ~DOMLSParser() {};
    00080
    00081     // -----------------------------------------------------------------------
    00082     //  Class types
    00083     // -----------------------------------------------------------------------
    00117     enum ActionType
    00118     {
    00119         ACTION_APPEND_AS_CHILDREN = 1,
    00120         ACTION_REPLACE_CHILDREN   = 2,
    00121         ACTION_INSERT_BEFORE      = 3,
    00122         ACTION_INSERT_AFTER       = 4,
    00123         ACTION_REPLACE            = 5
    00124     };
    00126
    00127     // -----------------------------------------------------------------------
    00128     //  Virtual DOMLSParser interface
    00129     // -----------------------------------------------------------------------
    00132
    00133     // -----------------------------------------------------------------------
    00134     //  Getter methods
    00135     // -----------------------------------------------------------------------
    00136
    00377     virtual DOMConfiguration* getDomConfig() = 0;
    00378
    00388     virtual const DOMLSParserFilter* getFilter() const = 0;
    00389
    00397     virtual bool getAsync() const = 0;
    00398
    00406     virtual bool getBusy() const = 0;
    00407
    00408     // -----------------------------------------------------------------------
    00409     //  Setter methods
    00410     // -----------------------------------------------------------------------
    00431     virtual void setFilter(DOMLSParserFilter* const filter) = 0;
    00432
    00433     // -----------------------------------------------------------------------
    00434     //  Parsing methods
    00435     // -----------------------------------------------------------------------
    00462     virtual DOMDocument* parse(const DOMLSInput* source) = 0;
    00463
    00490     virtual DOMDocument* parseURI(const XMLCh* const uri) = 0;
    00491
    00518     virtual DOMDocument* parseURI(const char* const uri) = 0;
    00519
    00587     virtual void parseWithContext
    00588     (
    00589         const   DOMLSInput*     source
    00590         ,       DOMNode*        contextNode
    00591         , const ActionType      action
    00592     ) = 0;
    00593
    00602     virtual void abort() = 0;
    00604
    00605     // -----------------------------------------------------------------------
    00606     //  Non-standard Extension
    00607     // -----------------------------------------------------------------------
    00616     virtual void              release() = 0;
    00617
    00641     virtual void              resetDocumentPool() = 0;
    00642
    00668     virtual Grammar* loadGrammar(const DOMLSInput* source,
    00669                                  const Grammar::GrammarType grammarType,
    00670                                  const bool toCache = false) = 0;
    00671
    00695     virtual Grammar* loadGrammar(const XMLCh* const systemId,
    00696                                  const Grammar::GrammarType grammarType,
    00697                                  const bool toCache = false) = 0;
    00698
    00722     virtual Grammar* loadGrammar(const char* const systemId,
    00723                                  const Grammar::GrammarType grammarType,
    00724                                  const bool toCache = false) = 0;
    00725
    00732     virtual Grammar* getGrammar(const XMLCh* const nameSpaceKey) const = 0;
    00733
    00739     virtual Grammar* getRootGrammar() const = 0;
    00740
    00747     virtual const XMLCh* getURIText(unsigned int uriId) const = 0;
    00748
    00752     virtual void resetCachedGrammarPool() = 0;
    00753
    00759     virtual XMLFilePos getSrcOffset() const = 0;
    00760
    00762
    00763 };
    00764
    00765
    00766 XERCES_CPP_NAMESPACE_END
    00767
    00768 #endif