Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.11


XNumber.hpp
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18 #if !defined(XNUMBER_HEADER_GUARD_1357924680)
19 #define XNUMBER_HEADER_GUARD_1357924680
20 
21 
22 
23 // Base header file. Must be first.
25 
26 
27 
29 
30 
31 
32 // Base class header file.
34 
35 
36 
37 XALAN_CPP_NAMESPACE_BEGIN
38 
39 
40 
42 {
43 public:
44 
45  /**
46  * Create an XNumber from a number.
47  *
48  * @param val numeric value to use
49  */
50  XNumber(
51  double val,
52  MemoryManager& theMemoryManager);
53 
54  XNumber(
55  const XNumber& source,
56  MemoryManager& theMemoryManager);
57 
58  virtual
59  ~XNumber();
60 
61  // These methods are inherited from XObject ...
62 
63  virtual double
64  num(XPathExecutionContext& executionContext) const;
65 
66  virtual double
67  num() const;
68 
69  virtual const XalanDOMString&
70  str(XPathExecutionContext& executionContext) const;
71 
72  virtual const XalanDOMString&
73  str() const;
74 
75  virtual void
76  str(
77  XPathExecutionContext& executionContext,
78  FormatterListener& formatterListener,
79  MemberFunctionPtr function) const;
80 
81  virtual void
82  str(
83  FormatterListener& formatterListener,
84  MemberFunctionPtr function) const;
85 
86  virtual void
87  str(
88  XPathExecutionContext& executionContext,
89  XalanDOMString& theBuffer) const;
90 
91  virtual void
92  str(XalanDOMString& theBuffer) const;
93 
94  virtual double
95  stringLength(XPathExecutionContext& executionContext) const;
96 
97  // These methods are new to XNumber...
98 
99  /**
100  * Change the value of an XNumber
101  *
102  * @param theValue The new value.
103  */
104  void
105  set(double theValue);
106 
107 private:
108  // not implemented
109  XNumber();
110  XNumber(const XNumber&);
111 
112  // Value of the number being represented.
113  double m_value;
114 
115  mutable XalanDOMString m_cachedStringValue;
116 };
117 
118 
119 
120 XALAN_CPP_NAMESPACE_END
121 
122 
123 
124 #endif // XNUMBER_HEADER_GUARD_1357924680
virtual double stringLength(XPathExecutionContext &executionContext) const =0
Get the length of the string value of the instance.
virtual double num() const
Cast result object to a number.
A SAX-based formatter interface for the XSL processor.
virtual const XalanDOMString & str() const =0
Cast result object to a string.
#define XALAN_XPATH_EXPORT

Interpreting class diagrams

Doxygen and GraphViz are used to generate this API documentation from the Xalan-C header files.

Xalan-C++ XSLT Processor Version 1.11
Copyright © 1999-2012 The Apache Software Foundation.
All Rights Reserved.

Apache Logo