Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

AVT.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_AVT_HEADER_GUARD)
17 #define XALAN_AVT_HEADER_GUARD
18 
19 // Base include file. Must be first.
21 
22 
23 
25 
26 
27 
28 XALAN_DECLARE_XERCES_CLASS(Locator)
29 
30 
31 
32 XALAN_CPP_NAMESPACE_BEGIN
33 
34 
35 
36 typedef XERCES_CPP_NAMESPACE_QUALIFIER Locator LocatorType;
37 
38 
39 
40 class AVTPart;
41 class PrefixResolver;
43 class XalanNode;
44 class StringTokenizer;
46 
47 
48 
52 class AVT
53 {
54 public:
55 
56 #if defined(XALAN_STRICT_ANSI_HEADERS)
57  typedef std::size_t size_type;
58 #else
59  typedef size_t size_type;
60 #endif
61 
73  AVT(
74  StylesheetConstructionContext& constructionContext,
75  const LocatorType* locator,
76  const XalanDOMChar* name,
77  const XalanDOMChar* stringedValue,
78  const PrefixResolver& resolver);
79 
80  virtual
81  ~AVT();
82 
88  const XalanDOMString&
89  getName() const
90  {
91  return m_name;
92  }
93 
102  void
103  evaluate(
104  XalanDOMString& buf,
105  XalanNode* contextNode,
106  const PrefixResolver& prefixResolver,
107  XPathExecutionContext& executionContext) const
108  {
109  if(m_simpleString != 0)
110  {
111  buf.assign(m_simpleString, m_simpleStringLength);
112  }
113  else
114  {
115  doEvaluate(buf, contextNode, prefixResolver, executionContext);
116  }
117  }
118 
126  void
127  evaluate(
128  XalanDOMString& buf,
129  const PrefixResolver& prefixResolver,
130  XPathExecutionContext& executionContext) const
131  {
132  if(m_simpleString != 0)
133  {
134  buf.assign(m_simpleString, m_simpleStringLength);
135  }
136  else
137  {
138  doEvaluate(buf, prefixResolver, executionContext);
139  }
140  }
141 
142 private:
143 
144  void
145  doEvaluate(
146  XalanDOMString& buf,
147  const PrefixResolver& prefixResolver,
148  XPathExecutionContext& executionContext) const;
149 
150  void
151  doEvaluate(
152  XalanDOMString& buf,
153  XalanNode* contextNode,
154  const PrefixResolver& prefixResolver,
155  XPathExecutionContext& executionContext) const;
156 
157  void
158  nextToken(
159  StylesheetConstructionContext& constructionContext,
160  const LocatorType* locator,
161  StringTokenizer& tokenizer,
162  XalanDOMString& token);
163 
164  // not implemented
165  AVT(const AVT&);
166 
167  AVT&
168  operator=(const AVT&);
169 
170  bool
171  operator==(const AVT&) const;
172 
173 
174  // Data members...
175  const AVTPart** m_parts;
176 
177  size_type m_partsSize;
178 
179  const XalanDOMChar* m_simpleString;
180 
181  XalanDOMString::size_type m_simpleStringLength;
182 
183  const XalanDOMString& m_name;
184 
185  static const XalanDOMString s_emptyString;
186 };
187 
188 
189 
190 XALAN_CPP_NAMESPACE_END
191 
192 
193 
194 #endif // XALAN_AVT_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