Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

CountersTable.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_COUNTERSTABLE_HEADER_GUARD_1357924680)
17 #define XALAN_COUNTERSTABLE_HEADER_GUARD_1357924680
18 
26 // Base include file. Must be first.
28 
29 
30 
32 
33 
34 
35 
37 
38 
39 
40 XALAN_CPP_NAMESPACE_BEGIN
41 
42 
43 
44 class ElemNumber;
46 
47 
48 
56 struct Counter
57 {
58  typedef unsigned long CountType;
59 
61 
69 
74 
81 
86 
91  MemoryManagerType& theManager,
92  const ElemNumber* numberElem,
93  NodeVectorType& countNodes) :
95  m_countNodes(countNodes, theManager),
96  m_fromNode(0),
97  m_numberElem(numberElem)
98  {
99  }
100 
104  Counter(MemoryManagerType& theManager, const ElemNumber* numberElem = 0) :
106  m_countNodes(theManager),
107  m_fromNode(0),
108  m_numberElem(numberElem)
109  {
110  }
111 
112  Counter(const Counter& other, MemoryManagerType& theManager) :
114  m_countNodes(other.m_countNodes, theManager),
115  m_fromNode(other.m_fromNode),
117  {
118  }
119 
126  CountType
129  const XalanNode* node) const;
130 
134  XalanNode*
135  getLast() const
136  {
137  return m_countNodes.empty() == true ? 0 : m_countNodes.back();
138  }
139 
140 private:
141  // Not implemented
142  Counter();
143  Counter(const Counter&);
144 };
145 
147 
149 XALAN_USES_MEMORY_MANAGER(CounterVectorTypeDecl)
150 
151 typedef XalanVector<CounterVectorTypeDecl> ElemCounterVectorVectorTypeDecl;
152 XALAN_USES_MEMORY_MANAGER(ElemCounterVectorVectorTypeDecl)
161 {
162 public:
163 
165 
166  typedef CounterVectorTypeDecl CounterVectorType;
167  typedef ElemCounterVectorVectorTypeDecl ElemCounterVectorVectorType;
168 
170 
175  unsigned long theSize = 0) :
176  m_countersVector(theManager),
177  m_newFound(theManager)
178  {
179  resize(theSize);
180  };
181 
183  {
184  }
185 
193  void
194  resize(unsigned long theSize)
195  {
196  m_countersVector.resize(theSize);
197  }
198 
208  CountType
209  countNode(
210  StylesheetExecutionContext& executionContext,
211  const ElemNumber& numberElem,
212  XalanNode* node);
213 
217  void
219  {
220  m_newFound.clear();
221 
222  m_countersVector.clear();
223  }
224 
225 private:
226  // not implemented
227  CountersTable();
228  CountersTable(const CountersTable&);
229 
233  ElemCounterVectorVectorType m_countersVector;
234 
235 
239  NodeVectorType m_newFound;
240 };
241 
242 
243 
244 XALAN_CPP_NAMESPACE_END
245 
246 
247 
248 #endif // !defined(XALAN_COUNTERSTABLE_HEADER_GUARD_1357924680)

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