Xalan-C++ API Reference  1.12.0
XercesDOM_NodeHack.hpp
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 
19 #if !defined(XERCESDOM_NODEHACK_HEADER_GUARD_1357924680)
20 #define XERCESDOM_NODEHACK_HEADER_GUARD_1357924680
21 
22 
23 
25 
26 
27 
28 #if XERCES_VERSION_MAJOR >= 2
29 #include <xercesc/dom/deprecated/DOM_Node.hpp>
30 #include <xercesc/dom/deprecated/DOM_Attr.hpp>
31 #include <xercesc/dom/deprecated/DOM_Element.hpp>
32 #include <xercesc/dom/deprecated/DOM_Text.hpp>
33 #else
34 #include <xercesc/dom/DOM_Node.hpp>
35 #include <xercesc/dom/DOM_Attr.hpp>
36 #include <xercesc/dom/DOM_Element.hpp>
37 #include <xercesc/dom/DOM_Text.hpp>
38 #endif
39 
40 
41 
43 
44 
45 
46 namespace XALAN_CPP_NAMESPACE {
47 
48 
49 /**
50  * This class is deprecated.
51  *
52  * An evil class to hack the Xerces smart-pointer class. I'm
53  * only doing this because I have to...
54  *
55  * @deprecated This class is part of the deprecated Xerces DOM bridge.
56  */
57 class XALAN_XERCESPARSERLIAISON_EXPORT XercesDOM_NodeHack : public xercesc::DOM_Node
58 {
59 public:
60 
61  typedef xercesc::DOM_Node ParentType;
62 
64 
66 
68  getImpl() const
69  {
70  return fImpl;
71  }
72 
73  static NodeImplType*
74  getImpl(const ParentType& theNode)
75  {
76  return static_cast<const XercesDOM_NodeHack&>(theNode).getImpl();
77  }
78 };
79 
80 
81 
82 class XALAN_XERCESPARSERLIAISON_EXPORT XercesDOM_AttrHack : public xercesc::DOM_Attr
83 {
84 public:
85 
86  typedef xercesc::DOM_Attr ParentType;
87 
89 
90  XercesDOM_AttrHack(const ParentType& theSource);
91 
93 };
94 
95 
96 
97 class XALAN_XERCESPARSERLIAISON_EXPORT XercesDOM_ElementHack : public xercesc::DOM_Element
98 {
99 public:
100 
101  typedef xercesc::DOM_Element ParentType;
102 
104 
106 
108 
109 
110  const DOMStringType
112 
113  const DOMStringType
115 
116  const DOMStringType
118 
119  const DOMStringType
120  getPrefixImpl() const;
121 
122  const DOMStringType
124 
125  const DOMStringType
126  getTagNameImpl() const;
127 
128  const DOMStringType
129  getAttributeImpl(const DOMStringType& name) const;
130 
131  const DOMStringType
133  const DOMStringType& namespaceURI,
134  const DOMStringType& localName) const;
135 
137  getImpl() const
138  {
139  return reinterpret_cast<ElementImplType*>(fImpl);
140  }
141 
142  static ElementImplType*
143  getImpl(const ParentType& theNode)
144  {
145  return static_cast<const XercesDOM_ElementHack&>(theNode).getImpl();
146  }
147 };
148 
149 
150 
151 class XALAN_XERCESPARSERLIAISON_EXPORT XercesDOM_TextHack : public xercesc::DOM_Text
152 {
153 public:
154 
155  typedef xercesc::DOM_Text ParentType;
156 
158 
159  XercesDOM_TextHack(const ParentType& theSource);
160 
162 
163 
164  const DOMStringType
166 
167  const DOMStringType
169 
170  const DOMStringType
172 
173  const DOMStringType
174  getPrefixImpl() const;
175 
176  const DOMStringType
178 
179  const DOMStringType
180  getDataImpl() const;
181 
182  TextImplType*
183  getImpl() const
184  {
185  return reinterpret_cast<TextImplType*>(fImpl);
186  }
187 
188  static TextImplType*
189  getImpl(const ParentType& theNode)
190  {
191  return static_cast<const XercesDOM_TextHack&>(theNode).getImpl();
192  }
193 };
194 
195 
196 
197 }
198 
199 
200 
201 #endif // !defined(XERCESDOM_NODEHACK_HEADER_GUARD_1357924680)
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
#define XALAN_XERCESPARSERLIAISON_EXPORT
XercesDOM_AttrHack(AttrImplType *theImpl=0)
XercesDOM_AttrHack(const ParentType &theSource)
const DOMStringType getNamespaceURIImpl() const
const DOMStringType getAttributeImpl(const DOMStringType &name) const
XercesDOM_ElementHack(ElementImplType *theImpl=0)
const DOMStringType getLocalNameImpl() const
const DOMStringType getNodeNameImpl() const
const DOMStringType getTagNameImpl() const
const DOMStringType getPrefixImpl() const
static ElementImplType * getImpl(const ParentType &theNode)
const DOMStringType getNodeValueImpl() const
XercesDOM_ElementHack(const ParentType &theSource)
ElementImplType * getImpl() const
const DOMStringType getAttributeNSImpl(const DOMStringType &namespaceURI, const DOMStringType &localName) const
This class is deprecated.
XercesDOM_NodeHack(NodeImplType *theImpl=0)
static NodeImplType * getImpl(const ParentType &theNode)
NodeImplType * getImpl() const
XercesDOM_TextHack(const ParentType &theSource)
TextImplType * getImpl() const
const DOMStringType getNodeNameImpl() const
const DOMStringType getLocalNameImpl() const
static TextImplType * getImpl(const ParentType &theNode)
const DOMStringType getDataImpl() const
const DOMStringType getNodeValueImpl() const
XercesDOM_TextHack(TextImplType *theImpl=0)
const DOMStringType getPrefixImpl() const
const DOMStringType getNamespaceURIImpl() const
xercesc::DOMString DOMStringType
xercesc::AttrImpl AttrImplType
xercesc::NodeImpl NodeImplType
xercesc::TextImpl TextImplType
xercesc::ElementImpl ElementImplType