Xalan-C++ API Reference  1.12.0
XalanAttr.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 #if !defined(XALANATTR_HEADER_GUARD_1357924680)
19 #define XALANATTR_HEADER_GUARD_1357924680
20 
21 
22 
25 
26 
27 
28 namespace XALAN_CPP_NAMESPACE {
29 
30 
31 
32 class XalanElement;
33 
34 
35 
36 /*
37  * Base class for the DOM Attr interface.
38  */
39 
41 {
42 public:
43 
44  XalanAttr();
45 
46  virtual
47  ~XalanAttr();
48 
49 
50  // These interfaces are inherited from XalanNode...
51  virtual const XalanDOMString&
52  getNodeName() const = 0;
53 
54  virtual const XalanDOMString&
55  getNodeValue() const = 0;
56 
57  virtual NodeType
58  getNodeType() const = 0;
59 
60  virtual XalanNode*
61  getParentNode() const = 0;
62 
63  virtual const XalanNodeList*
64  getChildNodes() const = 0;
65 
66  virtual XalanNode*
67  getFirstChild() const = 0;
68 
69  virtual XalanNode*
70  getLastChild() const = 0;
71 
72  virtual XalanNode*
73  getPreviousSibling() const = 0;
74 
75  virtual XalanNode*
76  getNextSibling() const = 0;
77 
78  virtual const XalanNamedNodeMap*
79  getAttributes() const = 0;
80 
81  virtual XalanDocument*
82  getOwnerDocument() const = 0;
83 
84  virtual const XalanDOMString&
85  getNamespaceURI() const = 0;
86 
87  virtual const XalanDOMString&
88  getPrefix() const = 0;
89 
90  virtual const XalanDOMString&
91  getLocalName() const = 0;
92 
93  virtual bool
94  isIndexed() const = 0;
95 
96  virtual IndexType
97  getIndex() const = 0;
98 
99  // These interfaces are new to XalanAttr...
100 
101  /**
102  * Returns the name of this attribute.
103  */
104  virtual const XalanDOMString&
105  getName() const = 0;
106 
107  /**
108  * Returns the value of the attribute.
109  *
110  * The value of the attribute is returned as a string.
111  */
112  virtual const XalanDOMString&
113  getValue() const = 0;
114 
115  /**
116  * The XalanElement node this attribute is attached to.
117  * If there is no such node, this returns a null pointer.
118  */
119  virtual XalanElement*
120  getOwnerElement() const = 0;
121 
122 protected:
123 
124  XalanAttr(const XalanAttr& theSource);
125 
126  XalanAttr&
127  operator=(const XalanAttr& theSource);
128 
129  bool
130  operator==(const XalanAttr& theRHS) const;
131 
132 private:
133 };
134 
135 
136 
137 }
138 
139 
140 
141 #endif // !defined(XALANATTR_HEADER_GUARD_1357924680)
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
xalanc::XalanNode
Definition: XalanNode.hpp:38
xalanc::XalanNode::NodeType
NodeType
Definition: XalanNode.hpp:47
xalanc::XalanDocument
Definition: XalanDocument.hpp:36
xalanc::operator==
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
Definition: XalanVector.hpp:1118
xalanc::XalanNode::IndexType
unsigned long IndexType
Definition: XalanNode.hpp:64
xalanc::XalanAttr
Definition: XalanAttr.hpp:40
XalanNode.hpp
xalanc::XalanNodeList
Definition: XalanNodeList.hpp:36
xalanc::XalanElement
Definition: XalanElement.hpp:44
xalanc::XalanNamedNodeMap
Definition: XalanNamedNodeMap.hpp:36
XalanDOMDefinitions.hpp
XALAN_DOM_EXPORT
#define XALAN_DOM_EXPORT
Definition: XalanDOMDefinitions.hpp:37
xalanc::XalanDOMString
Definition: XalanDOMString.hpp:45