Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

ResultNamespacesStack.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(XALAN_RESULTNAMESPACESSTACK_HEADER_GUARD)
17 #define XALAN_RESULTNAMESPACESSTACK_HEADER_GUARD
18 
19 
20 
21 // Base include file. Must be first.
23 
24 
25 
27 
28 
29 
31 
32 
33 
35 
36 
37 
38 XALAN_CPP_NAMESPACE_BEGIN
39 
40 
41 
43 {
44 public:
45 
46 
47 #if defined(XALAN_USE_DEQUE_FOR_VECTOR_BOOL)
48  #if defined(XALAN_NO_STD_NAMESPACE)
49  typedef deque<bool> BoolVectorType;
50  #else
51  typedef std::deque<bool> BoolVectorType;
52  #endif
53 #else
55 #endif
56 
59 
61 
62 
63  explicit
65 
67 
68  void
70  const XalanDOMString& thePrefix,
71  const XalanDOMString& theNamespaceURI)
72  {
73  addDeclaration(
74  thePrefix,
75  theNamespaceURI.c_str(),
76  theNamespaceURI.length());
77  }
78 
79  void
81  const XalanDOMString& thePrefix,
82  const XalanDOMChar* theNamespaceURI)
83  {
84  addDeclaration(
85  thePrefix,
86  theNamespaceURI,
87  length(theNamespaceURI));
88  }
89 
90  void
91  addDeclaration(
92  const XalanDOMString& thePrefix,
93  const XalanDOMChar* theNamespaceURI,
94  XalanDOMString::size_type theLength);
95 
96  void
97  pushContext();
98 
99  void
100  popContext();
101 
102  const XalanDOMString*
103  getNamespaceForPrefix(const XalanDOMString& thePrefix) const;
104 
105  const XalanDOMString*
106  getPrefixForNamespace(const XalanDOMString& theNamespaceURI) const;
107 
112  bool
113  prefixIsPresentLocal(const XalanDOMString& thePrefix);
114 
115  void
116  clear();
117 
118  size_type
119  size() const
120  {
121  return m_resultNamespaces.size() - 1;
122  }
123 
124  bool
125  empty() const
126  {
127  return NamespacesStackType::const_iterator(m_stackPosition) == m_resultNamespaces.begin() ? true : false;
128  }
129 
130 private:
131 
132  // not implemented
134 
135  bool
136  operator==(const ResultNamespacesStack&) const;
137 
139  operator=(const ResultNamespacesStack&);
140 
141  enum { eDefaultCreateNewContextStackSize = 25 };
142 
146  NamespacesStackType m_resultNamespaces;
147 
148  NamespacesStackType::iterator m_stackBegin;
149 
150  NamespacesStackType::iterator m_stackPosition;
151 
152  BoolVectorType m_createNewContextStack;
153 };
154 
155 
156 
157 XALAN_CPP_NAMESPACE_END
158 
159 
160 
161 #endif // XALAN_RESULTNAMESPACESSTACK_HEADER_GUARD

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