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  * $Id$
0020  */
0021 
0022 #if !defined(XERCESC_INCLUDE_GUARD_DOMENTITYIMPL_HPP)
0023 #define XERCESC_INCLUDE_GUARD_DOMENTITYIMPL_HPP
0024 
0025 //
0026 //  This file is part of the internal implementation of the C++ XML DOM.
0027 //  It should NOT be included or used directly by application programs.
0028 //
0029 //  Applications should include the file <xercesc/dom/DOM.hpp> for the entire
0030 //  DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class
0031 //  name is substituded for the *.
0032 //
0033 
0034 #include <xercesc/util/XercesDefs.hpp>
0035 #include "DOMNodeBase.hpp"
0036 #include "DOMNodeImpl.hpp"
0037 #include "DOMParentNode.hpp"
0038 #include <xercesc/dom/DOMEntity.hpp>
0039 
0040 XERCES_CPP_NAMESPACE_BEGIN
0041 
0042 
0043 class    DOMEntityReference;
0044 
0045 class CDOM_EXPORT DOMEntityImpl: public DOMEntity, public HasDOMNodeImpl, public HasDOMParentImpl {
0046 protected:
0047     DOMNodeImpl      fNode;
0048     DOMParentNode    fParent;
0049 
0050     const XMLCh *   fName;
0051     const XMLCh *   fPublicId;
0052     const XMLCh *   fSystemId;
0053     const XMLCh *   fNotationName;
0054     DOMEntityReference* fRefEntity;
0055 
0056     // New data introduced in DOM Level 3
0057     const XMLCh*          fInputEncoding;
0058     const XMLCh*          fXmlEncoding;
0059     const XMLCh*          fXmlVersion;
0060     const XMLCh*          fBaseURI;
0061     bool                  fEntityRefNodeCloned;
0062     
0063     // helper function
0064     void    cloneEntityRefTree() const;
0065 
0066     friend class XercesDOMParser;
0067 
0068 public:
0069     DOMEntityImpl(DOMDocument *doc, const XMLCh *eName);
0070     DOMEntityImpl(const DOMEntityImpl &other, bool deep=false);
0071     virtual ~DOMEntityImpl();
0072 
0073 public:
0074     // Declare all of the functions from DOMNode.
0075     DOMNODE_FUNCTIONS;
0076 
0077     // Add accessors for implementation bits.
0078     DOMNODEIMPL_DECL;
0079     DOMPARENTIMPL_DECL;
0080 
0081 public:
0082     virtual const XMLCh *   getPublicId() const;
0083     virtual const XMLCh *   getSystemId() const;
0084     virtual const XMLCh *   getNotationName() const;
0085     virtual void            setNotationName(const XMLCh *arg);
0086     virtual void            setPublicId(const XMLCh *arg);
0087     virtual void            setSystemId(const XMLCh *arg);
0088 
0089     //DOM Level 2 additions. Non standard functions
0090     virtual void            setEntityRef(DOMEntityReference *);
0091     virtual DOMEntityReference* getEntityRef() const;
0092 
0093     //Introduced in DOM Level 3
0094     virtual const XMLCh*    getInputEncoding() const;
0095     virtual const XMLCh*    getXmlEncoding() const;
0096     virtual const XMLCh*    getXmlVersion() const;
0097     virtual void            setBaseURI(const XMLCh *arg);
0098 
0099     void                    setInputEncoding(const XMLCh* actualEncoding);
0100     void                    setXmlEncoding(const XMLCh* encoding);
0101     void                    setXmlVersion(const XMLCh* version);
0102 private:
0103     // -----------------------------------------------------------------------
0104     // Unimplemented constructors and operators
0105     // -----------------------------------------------------------------------    
0106     DOMEntityImpl & operator = (const DOMEntityImpl &);
0107 };
0108 
0109 XERCES_CPP_NAMESPACE_END
0110 
0111 #endif
0112