Back to home page

EIC code displayed by LXR

 
 

    


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

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_DOMNODEBASE_HPP)
0023 #define XERCESC_INCLUDE_GUARD_DOMNODEBASE_HPP
0024 
0025 #include <xercesc/util/XercesDefs.hpp>
0026 
0027 XERCES_CPP_NAMESPACE_BEGIN
0028 
0029 
0030 class DOMNodeImpl;
0031 class DOMParentNode;
0032 class DOMChildNode;
0033 
0034 //
0035 //  This file is part of the internal implementation of the C++ XML DOM.
0036 //  It should NOT be included or used directly by application programs.
0037 //
0038 //  Applications should include the file <xercesc/dom/DOM.hpp> for the entire
0039 //  DOM API, or xercesc/dom/DOM*.hpp for individual DOM classes, where the class
0040 //  name is substituded for the *.
0041 //
0042 
0043 /**
0044  * Virtual base class with accessors for shared characteristics of DOM implementation
0045  * types, this is a workaround for the current class design that allows the various
0046  * implementation classes to punch into the internals of each others members without
0047  * using unsafe casts that depend on object layout.
0048  */
0049 class  CDOM_EXPORT HasDOMNodeImpl {
0050 protected:
0051     // -----------------------------------------------------------------------
0052     //  Hidden constructor
0053     // -----------------------------------------------------------------------
0054     /** @name Hidden constructors */
0055     //@{
0056     HasDOMNodeImpl() {}
0057     //@}
0058 
0059 private:
0060     // -----------------------------------------------------------------------
0061     // Unimplemented constructors and operators
0062     // -----------------------------------------------------------------------
0063     /** @name Unimplemented operators */
0064     //@{
0065     HasDOMNodeImpl & operator= (const HasDOMNodeImpl &);
0066     //@}
0067 
0068 public:
0069     // -----------------------------------------------------------------------
0070     //  All constructors are hidden, just the destructor is available
0071     // -----------------------------------------------------------------------
0072     /** @name Destructor */
0073     //@{
0074     /**
0075      * Destructor
0076      *
0077      */
0078     virtual ~HasDOMNodeImpl() {};
0079     //@}
0080 
0081     // -----------------------------------------------------------------------
0082     //  Virtual HasDOMNodeImpl interface
0083     // -----------------------------------------------------------------------
0084     //@{
0085     // -----------------------------------------------------------------------
0086     //  Getter methods
0087     // -----------------------------------------------------------------------
0088 
0089     /**
0090      * Gets the embedded <code>DOMNodeImpl</code> member.
0091      */
0092     virtual DOMNodeImpl        *getNodeImpl() = 0;
0093 
0094     /**
0095      * Gets the embedded <code>DOMNodeImpl</code> member.
0096      */
0097     virtual const DOMNodeImpl  *getNodeImpl() const = 0;
0098     //@}
0099 };
0100 
0101 /**
0102  * Virtual base class with accessors for shared characteristics of DOM implementation
0103  * types, this is a workaround for the current class design that allows the various
0104  * implementation classes to punch into the internals of each others members without
0105  * using unsafe casts that depend on object layout.
0106  */
0107 class  CDOM_EXPORT HasDOMParentImpl {
0108 protected:
0109     // -----------------------------------------------------------------------
0110     //  Hidden constructor
0111     // -----------------------------------------------------------------------
0112     /** @name Hidden constructors */
0113     //@{
0114     HasDOMParentImpl() {}
0115     //@}
0116 
0117 private:
0118     // -----------------------------------------------------------------------
0119     // Unimplemented constructors and operators
0120     // -----------------------------------------------------------------------
0121     /** @name Unimplemented operators */
0122     //@{
0123     HasDOMParentImpl & operator= (const HasDOMParentImpl &);
0124     //@}
0125 
0126 public:
0127     // -----------------------------------------------------------------------
0128     //  All constructors are hidden, just the destructor is available
0129     // -----------------------------------------------------------------------
0130     /** @name Destructor */
0131     //@{
0132     /**
0133      * Destructor
0134      *
0135      */
0136     virtual ~HasDOMParentImpl() {};
0137     //@}
0138 
0139     // -----------------------------------------------------------------------
0140     //  Virtual HasDOMParentImpl interface
0141     // -----------------------------------------------------------------------
0142     //@{
0143     // -----------------------------------------------------------------------
0144     //  Getter methods
0145     // -----------------------------------------------------------------------
0146 
0147     /**
0148      * Gets the embedded <code>DOMParentNode</code> member.
0149      */
0150     virtual DOMParentNode      *getParentNodeImpl() = 0;
0151 
0152     /**
0153      * Gets the embedded <code>DOMParentNode</code> member.
0154      */
0155     virtual const DOMParentNode *getParentNodeImpl() const = 0;
0156     //@}
0157 };
0158 
0159 /**
0160  * Virtual base class with accessors for shared characteristics of DOM implementation
0161  * types, this is a workaround for the current class design that allows the various
0162  * implementation classes to punch into the internals of each others members without
0163  * using unsafe casts that depend on object layout.
0164  */
0165 class  CDOM_EXPORT HasDOMChildImpl {
0166 protected:
0167     // -----------------------------------------------------------------------
0168     //  Hidden constructor
0169     // -----------------------------------------------------------------------
0170     /** @name Hidden constructors */
0171     //@{
0172     HasDOMChildImpl() {}
0173     //@}
0174 
0175 private:
0176     // -----------------------------------------------------------------------
0177     // Unimplemented constructors and operators
0178     // -----------------------------------------------------------------------
0179     /** @name Unimplemented operators */
0180     //@{
0181     HasDOMChildImpl & operator= (const HasDOMChildImpl &);
0182     //@}
0183 
0184 public:
0185     // -----------------------------------------------------------------------
0186     //  All constructors are hidden, just the destructor is available
0187     // -----------------------------------------------------------------------
0188     /** @name Destructor */
0189     //@{
0190     /**
0191      * Destructor
0192      *
0193      */
0194     virtual ~HasDOMChildImpl() {};
0195     //@}
0196 
0197     // -----------------------------------------------------------------------
0198     //  Virtual HasDOMChildImpl interface
0199     // -----------------------------------------------------------------------
0200     //@{
0201     // -----------------------------------------------------------------------
0202     //  Getter methods
0203     // -----------------------------------------------------------------------
0204 
0205     /**
0206      * Gets the embedded <code>DOMChildNode</code> member.
0207      */
0208     virtual DOMChildNode      *getChildNodeImpl() = 0;
0209 
0210     /**
0211      * Gets the embedded <code>DOMChildNode</code> member.
0212      */
0213     virtual const DOMChildNode *getChildNodeImpl() const = 0;
0214     //@}
0215 };
0216 
0217 #define DOMNODEIMPL_DECL \
0218     virtual DOMNodeImpl* getNodeImpl(); \
0219     virtual const DOMNodeImpl* getNodeImpl() const;
0220 
0221 #define DOMNODEIMPL_IMPL(classname) \
0222     DOMNodeImpl*         classname::getNodeImpl() {return &fNode;} \
0223     const DOMNodeImpl*   classname::getNodeImpl() const {return &fNode;}
0224 
0225 #define DOMPARENTIMPL_DECL \
0226     virtual DOMParentNode* getParentNodeImpl(); \
0227     virtual const DOMParentNode* getParentNodeImpl() const;
0228 
0229 #define DOMPARENTIMPL_IMPL(classname) \
0230     DOMParentNode*       classname::getParentNodeImpl() {return &fParent;} \
0231     const DOMParentNode* classname::getParentNodeImpl() const {return &fParent;}
0232 
0233 #define DOMCHILDIMPL_DECL \
0234     virtual DOMChildNode* getChildNodeImpl(); \
0235     virtual const DOMChildNode* getChildNodeImpl() const;
0236     
0237 #define DOMCHILDIMPL_IMPL(classname) \
0238     DOMChildNode*       classname::getChildNodeImpl() {return &fChild;} \
0239     const DOMChildNode* classname::getChildNodeImpl() const {return &fChild;}
0240 
0241 
0242 XERCES_CPP_NAMESPACE_END
0243 
0244 #endif