Xerces-C++: DOMLSParser.hpp Source File

- Main Page
- Related Pages
- Classes
- Files

# 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 832686 2009-11-04 08:55:59Z 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/dom/DOMLSParserFilter.hpp>
    00028 #include <xercesc/util/XercesDefs.hpp>
    00029 #include <xercesc/validators/common/Grammar.hpp>
    00030
    00031 XERCES_CPP_NAMESPACE_BEGIN
    00032
    00033
    00034 class DOMErrorHandler;
    00035 class DOMLSInput;
    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     // -----------------------------------------------------------------------
    00463     virtual DOMDocument* parse(const DOMLSInput* source) = 0;
    00464
    00492     virtual DOMDocument* parseURI(const XMLCh* const uri) = 0;
    00493
    00521     virtual DOMDocument* parseURI(const char* const uri) = 0;
    00522
    00590     virtual DOMNode* parseWithContext(const DOMLSInput* source, DOMNode* contextNode, const ActionType action) = 0;
    00591
    00600     virtual void abort() = 0;
    00602
    00603     // -----------------------------------------------------------------------
    00604     //  Non-standard Extension
    00605     // -----------------------------------------------------------------------
    00614     virtual void              release() = 0;
    00615
    00639     virtual void              resetDocumentPool() = 0;
    00640
    00666     virtual Grammar* loadGrammar(const DOMLSInput* source,
    00667                                  const Grammar::GrammarType grammarType,
    00668                                  const bool toCache = false) = 0;
    00669
    00693     virtual Grammar* loadGrammar(const XMLCh* const systemId,
    00694                                  const Grammar::GrammarType grammarType,
    00695                                  const bool toCache = false) = 0;
    00696
    00720     virtual Grammar* loadGrammar(const char* const systemId,
    00721                                  const Grammar::GrammarType grammarType,
    00722                                  const bool toCache = false) = 0;
    00723
    00730     virtual Grammar* getGrammar(const XMLCh* const nameSpaceKey) const = 0;
    00731
    00737     virtual Grammar* getRootGrammar() const = 0;
    00738
    00745     virtual const XMLCh* getURIText(unsigned int uriId) const = 0;
    00746
    00750     virtual void resetCachedGrammarPool() = 0;
    00751
    00757     virtual XMLFilePos getSrcOffset() const = 0;
    00758
    00760
    00761 };
    00762
    00763
    00764 XERCES_CPP_NAMESPACE_END
    00765
    00766 #endif