Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

XalanNamespace.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 1999-2004 The Apache Software Foundation.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #if !defined(XALANNAMESPACE_HEADER_GUARD_1357924680)
17 #define XALANNAMESPACE_HEADER_GUARD_1357924680
18 
19 
20 
21 // Base header file. Must be first.
23 
24 
25 
27 
28 
29 
30 XALAN_CPP_NAMESPACE_BEGIN
31 
32 
33 
35 {
36 public:
37 
38  explicit
40  m_prefix(theManager),
41  m_uri(theManager)
42  {
43  }
44 
53  const XalanDOMString& thePrefix,
54  const XalanDOMString& theURI,
55  MemoryManagerType& theManager) :
56  m_prefix(thePrefix,theManager),
57  m_uri(theURI, theManager)
58  {
59  }
60 
62  const XalanNamespace& other,
63  MemoryManagerType& theManager) :
64  m_prefix(other.m_prefix,theManager),
65  m_uri(other.m_uri, theManager)
66  {
67  }
68 
70  {
71  }
72 
78  const XalanDOMString&
79  getPrefix() const
80  {
81  return m_prefix;
82  }
83 
89  void
90  setPrefix(const XalanDOMString& thePrefix)
91  {
92  m_prefix = thePrefix;
93  }
94 
100  const XalanDOMString&
101  getURI() const
102  {
103  return m_uri;
104  }
105 
111  void
112  setURI(const XalanDOMString& theURI)
113  {
114  m_uri = theURI;
115  }
116 
122  void
123  setURI(const XalanDOMChar* theURI)
124  {
125  assert(theURI != 0);
126 
127  m_uri = theURI;
128  }
129 
136  void
138  const XalanDOMChar* theURI,
140  {
141  assert(theURI != 0);
142 
143  m_uri.assign(theURI, len);
144  }
145 
146  bool
147  empty() const
148  {
149  return m_prefix.empty() && m_uri.empty();
150  }
151 
152  void
154  {
155  m_prefix.clear();
156 
157  m_uri.clear();
158  }
159 
165  bool
166  operator==(const XalanNamespace& theRHS) const
167  {
168  return equals(m_prefix, theRHS.m_prefix) &&
169  equals(m_uri, theRHS.m_uri);
170  }
171 
172 private:
173  //Not implemented
174  XalanNamespace();
176 
177  XalanDOMString m_prefix;
178 
179  XalanDOMString m_uri;
180 };
181 
183 
184 XALAN_CPP_NAMESPACE_END
185 
186 
187 
188 #endif // ALANNAMESPACE_HEADER_GUARD_1357924680
XalanNamespace(const XalanNamespace &other, MemoryManagerType &theManager)
Definition: XalanNamespace.hpp:61
bool operator==(const XalanNamespace &theRHS) const
Equality operator.
Definition: XalanNamespace.hpp:166
XalanNamespace(const XalanDOMString &thePrefix, const XalanDOMString &theURI, MemoryManagerType &theManager)
Construct a namespace for placement on the result tree namespace stack.
Definition: XalanNamespace.hpp:52
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager MemoryManagerType
Definition: XalanMemoryManagement.hpp:39
void clear()
Definition: XalanDOMString.hpp:257
void setURI(const XalanDOMChar *theURI)
Set the URI for namespace.
Definition: XalanNamespace.hpp:123
XalanDOMString & assign(const XalanDOMChar *theSource)
Definition: XalanDOMString.hpp:364
void setURI(const XalanDOMChar *theURI, XalanDOMString::size_type len)
Set the URI for namespace.
Definition: XalanNamespace.hpp:137
~XalanNamespace()
Definition: XalanNamespace.hpp:69
const XalanDOMString & getPrefix() const
Retrieve the thePrefix for namespace.
Definition: XalanNamespace.hpp:79
const XalanDOMString & getURI() const
Retrieve the URI for namespace.
Definition: XalanNamespace.hpp:101
bool empty() const
Definition: XalanNamespace.hpp:147
void setURI(const XalanDOMString &theURI)
Set the URI for namespace.
Definition: XalanNamespace.hpp:112
#define XALAN_USES_MEMORY_MANAGER(Type)
Definition: XalanMemoryManagement.hpp:468
Definition: XalanDOMString.hpp:42
Definition: XalanNamespace.hpp:34
XalanNamespace(MemoryManagerType &theManager)
Definition: XalanNamespace.hpp:39
void clear()
Definition: XalanNamespace.hpp:153
unsigned int size_type
Definition: XalanDOMString.hpp:53
bool empty() const
Definition: XalanDOMString.hpp:274
equals(const XalanDOMChar *theLHS, const XalanDOMChar *theRHS, XalanDOMString::size_type theLength)
Compare the contents of two arrays for equality.
void setPrefix(const XalanDOMString &thePrefix)
Set the thePrefix for namespace.
Definition: XalanNamespace.hpp:90

Interpreting class diagrams

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

dot

Xalan-C++ XSLT Processor Version 1.10
Copyright © 1999-2004 The Apache Software Foundation. All Rights Reserved.

Apache Logo