Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.4

Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

XercesDOM_NodeHack.hpp

Go to the documentation of this file.
00001 #if !defined(XERCESDOM_NODEHACK_HEADER_GUARD_1357924680)
00002 #define XERCESDOM_NODEHACK_HEADER_GUARD_1357924680
00003 
00004 
00005 
00006 #include <XercesParserLiaison/XercesParserLiaisonDefinitions.hpp>
00007 
00008 
00009 
00010 #if XERCES_VERSION_MAJOR >= 2
00011 #include <xercesc/dom/deprecated/DOM_Node.hpp>
00012 #include <xercesc/dom/deprecated/DOM_Attr.hpp>
00013 #include <xercesc/dom/deprecated/DOM_Element.hpp>
00014 #include <xercesc/dom/deprecated/DOM_Text.hpp>
00015 #else
00016 #include <xercesc/dom/DOM_Node.hpp>
00017 #include <xercesc/dom/DOM_Attr.hpp>
00018 #include <xercesc/dom/DOM_Element.hpp>
00019 #include <xercesc/dom/DOM_Text.hpp>
00020 #endif
00021 
00022 
00023 // An evil class to hack the Xerces smart-pointer class.  I'm
00024 // only doing this because I have to...
00025 class XALAN_XERCESPARSERLIAISON_EXPORT XercesDOM_NodeHack : public DOM_Node
00026 {
00027 public:
00028 
00029     XercesDOM_NodeHack(NodeImpl*    theImpl = 0);
00030 
00031     ~XercesDOM_NodeHack();
00032 
00033     NodeImpl*
00034     getImpl() const
00035     {
00036         return fImpl;
00037     }
00038 
00039     static NodeImpl*
00040     getImpl(const DOM_Node&     theNode)
00041     {
00042 #if defined(XALAN_OLD_STYLE_CASTS)
00043         return ((const XercesDOM_NodeHack&)theNode).getImpl();
00044 #else
00045         return static_cast<const XercesDOM_NodeHack&>(theNode).getImpl();
00046 #endif
00047     }
00048 };
00049 
00050 
00051 
00052 class XALAN_XERCESPARSERLIAISON_EXPORT XercesDOM_AttrHack : public DOM_Attr
00053 {
00054 public:
00055 
00056     XercesDOM_AttrHack(AttrImpl*    theImpl = 0);
00057 
00058     XercesDOM_AttrHack(const DOM_Attr&  theSource);
00059 
00060     ~XercesDOM_AttrHack();
00061 };
00062 
00063 
00064 
00065 class XALAN_XERCESPARSERLIAISON_EXPORT XercesDOM_ElementHack : public DOM_Element
00066 {
00067 public:
00068 
00069     XercesDOM_ElementHack(ElementImpl*  theImpl = 0);
00070 
00071     XercesDOM_ElementHack(const DOM_Element&    theSource);
00072 
00073     ~XercesDOM_ElementHack();
00074 
00075 
00076     const DOMString
00077     getNodeNameImpl() const;
00078 
00079     const DOMString
00080     getNodeValueImpl() const;
00081 
00082     const DOMString
00083     getNamespaceURIImpl() const;
00084 
00085     const DOMString
00086     getPrefixImpl() const;
00087 
00088     const DOMString
00089     getLocalNameImpl() const;
00090 
00091     const DOMString
00092     getTagNameImpl() const;
00093 
00094     const DOMString
00095     getAttributeImpl(const DOMString&   name) const;
00096 
00097     const DOMString
00098     getAttributeNSImpl(
00099             const DOMString&    namespaceURI,
00100             const DOMString&    localName) const;
00101 
00102     ElementImpl*
00103     getImpl() const
00104     {
00105 #if defined(XALAN_OLD_STYLE_CASTS)
00106         return (ElementImpl*)fImpl;
00107 #else
00108         return reinterpret_cast<ElementImpl*>(fImpl);
00109 #endif
00110     }
00111 
00112     static ElementImpl*
00113     getImpl(const DOM_Element&  theNode)
00114     {
00115 #if defined(XALAN_OLD_STYLE_CASTS)
00116         return ((const XercesDOM_ElementHack&)theNode).getImpl();
00117 #else
00118         return static_cast<const XercesDOM_ElementHack&>(theNode).getImpl();
00119 #endif
00120     }
00121 };
00122 
00123 
00124 
00125 class XALAN_XERCESPARSERLIAISON_EXPORT XercesDOM_TextHack : public DOM_Text
00126 {
00127 public:
00128 
00129     XercesDOM_TextHack(TextImpl*    theImpl = 0);
00130 
00131     XercesDOM_TextHack(const DOM_Text&  theSource);
00132 
00133     ~XercesDOM_TextHack();
00134 
00135 
00136     const DOMString
00137     getNodeNameImpl() const;
00138 
00139     const DOMString
00140     getNodeValueImpl() const;
00141 
00142     const DOMString
00143     getNamespaceURIImpl() const;
00144 
00145     const DOMString
00146     getPrefixImpl() const;
00147 
00148     const DOMString
00149     getLocalNameImpl() const;
00150 
00151     const DOMString
00152     getDataImpl() const;
00153 
00154     TextImpl*
00155     getImpl() const
00156     {
00157 #if defined(XALAN_OLD_STYLE_CASTS)
00158         return (TextImpl*)fImpl;
00159 #else
00160         return reinterpret_cast<TextImpl*>(fImpl);
00161 #endif
00162     }
00163 
00164     static TextImpl*
00165     getImpl(const DOM_Text& theNode)
00166     {
00167 #if defined(XALAN_OLD_STYLE_CASTS)
00168         return ((const XercesDOM_TextHack&)theNode).getImpl();
00169 #else
00170         return static_cast<const XercesDOM_TextHack&>(theNode).getImpl();
00171 #endif
00172     }
00173 };
00174 
00175 
00176 
00177 #endif  // !defined(XERCESDOM_NODEHACK_HEADER_GUARD_1357924680)

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.4
Copyright © 2000, 2001, 2002 The Apache Software Foundation. All Rights Reserved.