Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

XalanParsedURI.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 
17 #if !defined(XALANPARSEDURI_HEADER_GUARD_1357924680)
18 #define XALANPARSEDURI_HEADER_GUARD_1357924680
19 
20 
21 
22 // Base include file. Must be first.
24 
25 
26 
28 
29 
30 
31 
32 XALAN_CPP_NAMESPACE_BEGIN
33 
34 
35 
40 {
41 public:
42 
43  // Flags to say if a component is defined. Note that each component may
44  // be defined but empty, except for the path.
45 #if defined(XALAN_INLINE_INITIALIZATION)
46  static const int d_scheme = 1;
47  static const int d_authority = 2;
48  static const int d_query = 4;
49  static const int d_fragment = 8;
50 #else
52  {
53  d_scheme = 1,
54  d_authority = 2,
55  d_query = 4,
56  d_fragment = 8
57  };
58 #endif
59 
64  m_scheme(theManager),
65  m_authority(theManager),
66  m_path(theManager),
67  m_query(theManager),
68  m_fragment(theManager),
69  m_defined(0)
70  {
71  }
72 
80  const XalanDOMChar* uriString,
81  XalanDOMString::size_type uriStringLen,
82  MemoryManagerType& theManager) :
83  m_scheme(theManager),
84  m_authority(theManager),
85  m_path(theManager),
86  m_query(theManager),
87  m_fragment(theManager),
88  m_defined(0)
89  {
90  parse(uriString, uriStringLen);
91  }
92 
99  const XalanDOMString &uriString,
100  MemoryManagerType& theManager) :
101  m_scheme(theManager),
102  m_authority(theManager),
103  m_path(theManager),
104  m_query(theManager),
105  m_fragment(theManager),
106  m_defined(0)
107  {
108  parse(uriString.c_str(), uriString.length());
109  }
110 
113  {
114  return m_scheme.getMemoryManager();
115  }
116 
123  void parse(
124  const XalanDOMChar* uriString,
125  XalanDOMString::size_type uriStringLen);
126 
133  void parse(
134  const XalanDOMString &uriString)
135  {
136  parse(uriString.c_str(), uriString.length());
137  }
138 
144  XalanDOMString& make(XalanDOMString& theResult) const;
145 
151  void resolve(const XalanParsedURI &base);
152 
159  void resolve(
160  const XalanDOMChar *base,
161  const XalanDOMString::size_type baseLen)
162  {
163  XalanParsedURI baseURI(base, baseLen,getMemoryManager());
164 
165  resolve(baseURI);
166  }
167 
173  void resolve(
174  const XalanDOMString &base)
175  {
176  resolve(base.c_str(), base.length());
177  }
178 
188  static XalanDOMString& resolve(
189  const XalanDOMChar *relative,
190  XalanDOMString::size_type relativeLen,
191  const XalanDOMChar *base,
193  XalanDOMString& theResult
194  );
195 
196 
205  const XalanDOMString &relative,
206  const XalanDOMString &base,
207  XalanDOMString& theResult
208  )
209  {
210  return resolve(relative.c_str(), relative.length(), base.c_str(), base.length(), theResult);
211  }
212 
216  const XalanDOMString& getScheme() const
217  {
218  return m_scheme;
219  }
220 
224  bool isSchemeDefined() const
225  {
226  return m_defined & d_scheme;
227  }
228 
232  void setScheme(const XalanDOMChar *scheme)
233  {
234  m_scheme = scheme;
235  m_defined |= d_scheme;
236  }
237 
241  void setScheme(const XalanDOMString &scheme)
242  {
243  m_scheme = scheme;
244  m_defined |= d_scheme;
245  }
246 
250  const XalanDOMString& getAuthority() const
251  {
252  return m_authority;
253  }
254 
258  bool isAuthorityDefined() const
259  {
260  return m_defined & d_authority ? true : false;
261  }
262 
266  void setAuthority(const XalanDOMChar *authority)
267  {
268  m_authority = authority;
269  m_defined |= d_authority;
270  }
271 
275  void setAuthority(const XalanDOMString &authority)
276  {
277  m_authority = authority;
278  m_defined |= d_authority;
279  }
280 
284  const XalanDOMString& getPath() const
285  {
286  return m_path;
287  }
288 
292  void setPath(const XalanDOMChar *path)
293  {
294  m_path = path;
295  }
296 
300  void setPath(const XalanDOMString &path)
301  {
302  m_path = path;
303  }
304 
308  const XalanDOMString& getQuery() const
309  {
310  return m_query;
311  }
312 
316  bool isQueryDefined() const
317  {
318  return m_defined & d_query ? true : false;
319  }
320 
324  void setQuery(const XalanDOMChar *query)
325  {
326  m_query = query;
327  m_defined |= d_query;
328  }
329 
333  void setQuery(const XalanDOMString &query)
334  {
335  m_query = query;
336  m_defined |= d_query;
337  }
338 
342  const XalanDOMString& getFragment() const
343  {
344  return m_fragment;
345  }
346 
350  bool isFragmentDefined() const
351  {
352  return m_defined & d_fragment ? true : false;
353  }
354 
358  void setFragment(const XalanDOMChar *fragment)
359  {
360  m_fragment = fragment;
361  m_defined |= d_fragment;
362  }
363 
367  void setFragment(const XalanDOMString &fragment)
368  {
369  m_fragment = fragment;
370  m_defined |= d_fragment;
371  }
372 
376  unsigned int getDefined() const
377  {
378  return m_defined;
379  }
380 
384  void setDefined(unsigned int defined)
385  {
386  m_defined = defined;
387  }
388 
389 private:
390  // not implemented
391  XalanParsedURI();
393 
394  XalanDOMString m_scheme;
395  XalanDOMString m_authority;
396  XalanDOMString m_path;
397  XalanDOMString m_query;
398  XalanDOMString m_fragment;
399 
400  unsigned int m_defined;
401 };
402 
403 XALAN_CPP_NAMESPACE_END
404 
405 #endif // XALANPARSEDURI_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