Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:27:01

0001 /*
0002  * Licensed to the Apache Software Foundation (ASF) under one or more
0003  * contributor license agreements.  See the NOTICE file distributed with
0004  * this work for additional information regarding copyright ownership.
0005  * The ASF licenses this file to You under the Apache License, Version 2.0
0006  * (the "License"); you may not use this file except in compliance with
0007  * the License.  You may obtain a copy of the License at
0008  * 
0009  *      http://www.apache.org/licenses/LICENSE-2.0
0010  * 
0011  * Unless required by applicable law or agreed to in writing, software
0012  * distributed under the License is distributed on an "AS IS" BASIS,
0013  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
0014  * See the License for the specific language governing permissions and
0015  * limitations under the License.
0016  */
0017 
0018 //
0019 //  This file is part of the internal implementation of the C++ XML DOM.
0020 //  It should NOT be included or used directly by application programs.
0021 //
0022 //  Applications should include the file <xercesc/dom/DOM.hpp> for the entire
0023 //  DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class
0024 //  name is substituded for the *.
0025 //
0026 
0027 #if !defined(XERCESC_INCLUDE_GUARD_DOMCONFIGURATIONIMPL_HPP)
0028 #define XERCESC_INCLUDE_GUARD_DOMCONFIGURATIONIMPL_HPP
0029 
0030 //------------------------------------------------------------------------------------
0031 //  Includes
0032 //------------------------------------------------------------------------------------
0033 #include <xercesc/dom/DOMConfiguration.hpp>
0034 #include <xercesc/dom/DOMErrorHandler.hpp>
0035 #include <xercesc/util/XMLString.hpp>
0036 
0037 XERCES_CPP_NAMESPACE_BEGIN
0038 
0039 class DOMDocumentImpl;
0040 class DOMStringListImpl;
0041 
0042 class CDOM_EXPORT DOMConfigurationImpl : public DOMConfiguration
0043 {
0044 private:
0045     //unimplemented
0046     DOMConfigurationImpl(const DOMConfiguration &);
0047     DOMConfigurationImpl & operator = (const DOMConfiguration &);
0048 
0049 
0050 public:
0051 
0052     //-----------------------------------------------------------------------------------
0053     //  Constructor
0054     //-----------------------------------------------------------------------------------
0055     DOMConfigurationImpl(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
0056     ~DOMConfigurationImpl();
0057     
0058     enum DOMConfigurationFeature {
0059         FEATURE_CANONICAL_FORM                = 0x0001,
0060         FEATURE_CDATA_SECTIONS                = 0x0002,
0061         FEATURE_COMMENTS                      = 0x0004,
0062         FEATURE_DATATYPE_NORMALIZATION        = 0x0008,
0063         FEATURE_DISCARD_DEFAULT_CONTENT       = 0x0010, 
0064         FEATURE_ENTITIES                      = 0x0020,  
0065         FEATURE_INFOSET                       = 0x0040, 
0066         FEATURE_NAMESPACES                    = 0x0080, 
0067         FEATURE_NAMESPACE_DECLARATIONS        = 0x0100, 
0068         FEATURE_NORMALIZE_CHARACTERS          = 0x0200, 
0069         FEATURE_SPLIT_CDATA_SECTIONS          = 0x0400, 
0070         FEATURE_VALIDATE                      = 0x0800, 
0071         FEATURE_VALIDATE_IF_SCHEMA            = 0x1000, 
0072         FEATURE_ELEMENT_CONTENT_WHITESPACE    = 0x2000
0073     };
0074 
0075     unsigned short featureValues;
0076 
0077     // -----------------------------------------------------------------------
0078     //  Setter methods
0079     // -----------------------------------------------------------------------
0080 
0081     virtual void setParameter(const XMLCh* name, const void* value);
0082     virtual void setParameter(const XMLCh* name, bool value);
0083 
0084     // -----------------------------------------------------------------------
0085     //  Getter methods
0086     // -----------------------------------------------------------------------
0087     
0088     virtual const void* getParameter(const XMLCh* name) const;
0089 
0090                                         
0091     // -----------------------------------------------------------------------
0092     //  Query methods
0093     // -----------------------------------------------------------------------
0094 
0095     virtual bool canSetParameter(const XMLCh* name, const void* value) const;
0096     virtual bool canSetParameter(const XMLCh* name, bool value) const;
0097 
0098     virtual const DOMStringList* getParameterNames() const;
0099 
0100     // ---------------------------------------------------------------------------
0101     // Impl specific methods
0102     // ---------------------------------------------------------------------------
0103     
0104     /* specific get and set methods for non-boolean parameters
0105      * */
0106 
0107     DOMErrorHandler* getErrorHandler() const;
0108 
0109     const XMLCh* getSchemaType() const;
0110 
0111     const XMLCh* getSchemaLocation() const;
0112 
0113     void setErrorHandler(DOMErrorHandler *erHandler);
0114 
0115     void setSchemaType(const XMLCh* st);
0116 
0117     void setSchemaLocation(const XMLCh* sl);
0118     
0119     // The default values for the boolean parameters
0120     // from CANONICAL_FORM to ELEMENT_CONTENT_WHITESPACE
0121     // 10010110010110 = 0x2596
0122     static const unsigned short fDEFAULT_VALUES;
0123     
0124 
0125 protected:
0126     // implements a simple map between the name and its enum value
0127     DOMConfigurationFeature getFeatureFlag(const XMLCh* name) const;
0128 
0129     // the error handler
0130     DOMErrorHandler* fErrorHandler;
0131     
0132     // the schema type
0133     const XMLCh* fSchemaType;
0134     
0135     // the schema location
0136     const XMLCh* fSchemaLocation;
0137 
0138     // the list of supported parameters
0139     DOMStringListImpl* fSupportedParameters;
0140 
0141     MemoryManager* fMemoryManager;
0142 };
0143 
0144 XERCES_CPP_NAMESPACE_END
0145 
0146 #endif
0147 
0148 /**
0149  * End of file DOMConfigurationImpl.hpp
0150  */