Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

OutputContextStack.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_OUTPUTCONTEXTSTACK_HEADER_GUARD)
17 #define XALAN_OUTPUTCONTEXTSTACK_HEADER_GUARD
18 
19 
20 
21 // Base include file. Must be first.
23 
24 
25 
27 
28 
29 
31 
32 
33 
36 
37 
38 
39 XALAN_CPP_NAMESPACE_BEGIN
40 
41 
42 
43 class FormatterListener;
44 
45 
46 
48 {
49 public:
50 
52  {
54  FormatterListener* theListener = 0) :
55  m_flistener(theListener),
56  m_pendingAttributes(theManager),
57  m_pendingElementName(theManager),
58  m_hasPendingStartDocument(false),
59  m_mustFlushPendingStartDocument(false)
60  {
61  }
62 
63  OutputContext( const OutputContext& other,
64  MemoryManagerType& theManager) :
65  m_flistener(other.m_flistener),
66  m_pendingAttributes(other.m_pendingAttributes , theManager),
67  m_pendingElementName(other.m_pendingElementName , theManager),
68  m_hasPendingStartDocument(other.m_hasPendingStartDocument),
69  m_mustFlushPendingStartDocument(other.m_mustFlushPendingStartDocument)
70  {
71  }
72 
74  {
75  }
76 
77  void
79  {
80  m_flistener = 0;
81 
82  m_pendingAttributes.clear();
83 
84  m_pendingElementName.clear();
85 
86  m_hasPendingStartDocument = false;
87 
88  m_mustFlushPendingStartDocument = false;
89  }
90 
92 
94 
96 
98 
100  };
101 
103 
105 
106  explicit
108 
110 
111  void
112  pushContext(FormatterListener* theListener = 0);
113 
114  void
115  popContext();
116 
119  {
120  return (*m_stackPosition).m_flistener;
121  }
122 
125  {
126  return (*m_stackPosition).m_flistener;
127  }
128 
129  const AttributeListImpl&
131  {
132  return (*m_stackPosition).m_pendingAttributes;
133  }
134 
137  {
138  return (*m_stackPosition).m_pendingAttributes;
139  }
140 
141  const XalanDOMString&
143  {
144  return (*m_stackPosition).m_pendingElementName;
145  }
146 
149  {
150  return (*m_stackPosition).m_pendingElementName;
151  }
152 
153  const bool&
155  {
156  return (*m_stackPosition).m_hasPendingStartDocument;
157  }
158 
159  bool&
161  {
162  return (*m_stackPosition).m_hasPendingStartDocument;
163  }
164 
165  const bool&
167  {
168  return (*m_stackPosition).m_mustFlushPendingStartDocument;
169  }
170 
171  bool&
173  {
174  return (*m_stackPosition).m_mustFlushPendingStartDocument;
175  }
176 
177  size_type
178  size() const
179  {
180  // Since we always keep one dummy entry at the beginning,
181  // subtract one from the size
182  assert(m_stackSize == size_type(OutputContextStackType::const_iterator(m_stackPosition) - m_stack.begin()));
183 
184  return m_stackSize;
185  }
186 
187  bool
188  empty() const
189  {
190  return size() == 0 ? true : false;
191  }
192 
193  void
194  clear();
195 
196  void
197  reset();
198 
199 private:
200 
201  // not implemented
203 
204  bool
205  operator==(const OutputContextStack&) const;
206 
208  operator=(const OutputContextStack&);
209 
213  OutputContextStackType m_stack;
214 
215  OutputContextStackType::iterator m_stackPosition;
216 
217  size_type m_stackSize;
218 };
219 
220 
221 
222 XALAN_CPP_NAMESPACE_END
223 
224 
225 
226 #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