Xalan-C++ API Documentation

The Xalan C++ XSLT Processor Version 1.10

XToken.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(XTOKEN_HEADER_GUARD_1357924680)
17 #define XTOKEN_HEADER_GUARD_1357924680
18 
19 
20 
21 // Base header file. Must be first.
23 
24 
25 
26 // Base class...
27 #include <xalanc/XPath/XObject.hpp>
28 
29 
30 
31 XALAN_CPP_NAMESPACE_BEGIN
32 
33 
34 
36 {
37 public:
38 
39  XToken();
40 
46  explicit
47  XToken(const XalanDOMString& theString,
48  MemoryManagerType& theManager);
49 
56  XToken(
57  double theNumber,
58  const XalanDOMString& theString);
59 
60  XToken(const XToken& theSource);
61 
62  virtual
63  ~XToken();
64 
65  virtual const XalanDOMString&
66  getTypeString() const;
67 
68  virtual double
69  num() const;
70 
71  virtual bool
72  boolean() const;
73 
74  virtual const XalanDOMString&
75  str() const;
76 
77  virtual void
78  str(
79  FormatterListener& formatterListener,
80  MemberFunctionPtr function) const;
81 
82  virtual void
83  str(XalanDOMString& theBuffer) const;
84 
85  virtual double
86  stringLength() const;
87 
88  virtual void
90 
91  virtual void
92  ProcessXObjectTypeCallback(XObjectTypeCallback& theCallbackObject) const;
93 
94  XToken&
95  operator=(const XToken& theRHS)
96  {
97  m_stringValue = theRHS.m_stringValue;
98 
99  m_numberValue = theRHS.m_numberValue;
100 
101  return *this;
102  }
103 
109  void
110  set(const XalanDOMString& theString,
111  MemoryManagerType& theManager);
112 
119  void
120  set(
121  double theNumber,
122  const XalanDOMString& theString,
123  MemoryManagerType& theManager);
124 
125 protected:
126 
127  virtual void
128  referenced();
129 
130  virtual void
131  dereferenced();
132 
133 private:
134 
135  // Not defined...
136  bool
137  operator==(const XToken&) const;
138 
139  // Data members...
140  const XalanDOMString* m_stringValue;
141 
142  double m_numberValue;
143 
144  bool m_isString;
145 };
146 
147 
148 
149 XALAN_CPP_NAMESPACE_END
150 
151 
152 
153 #endif // XTOKEN_HEADER_GUARD_1357924680
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
Definition: XalanVector.hpp:1111
virtual void referenced()
Definition: XToken.hpp:35
The purpose of this class is to provide a way to get the "preferred" or closest matching type for XOb...
Definition: XObjectTypeCallback.hpp:51
XALAN_CPP_NAMESPACE_BEGIN typedef XERCES_CPP_NAMESPACE_QUALIFIER MemoryManager MemoryManagerType
Definition: XalanMemoryManagement.hpp:39
virtual void ProcessXObjectTypeCallback(XObjectTypeCallback &theCallbackObject)=0
Process a callback request for preferred type information.
virtual bool boolean() const
Cast result object to a boolean.
virtual const XalanDOMString & getTypeString() const =0
Given a request type, return the equivalent string.
A SAX-based formatter interface for the XSL processor.
Definition: FormatterListener.hpp:62
virtual double num() const
Cast result object to a number.
virtual void dereferenced()
Class to hold XPath return types.
Definition: XObject.hpp:61
virtual double stringLength() const =0
Get the length of the string value of the instance.
Definition: XalanDOMString.hpp:42
virtual const XalanDOMString & str() const
Cast result object to a string.
#define XALAN_XPATH_EXPORT
Definition: XPathDefinitions.hpp:33
XToken & operator=(const XToken &theRHS)
Definition: XToken.hpp:95

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