Xalan-C++ API Reference  1.12.0
XUnknown.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(XUKNOWN_HEADER_GUARD_1357924680)
19 #define XUKNOWN_HEADER_GUARD_1357924680
20 
21 
22 
23 // Base header file. Must be first.
25 
26 
27 
29 
30 
31 
32 // Base class header file.
33 #include <xalanc/XPath/XObject.hpp>
34 
35 
36 
37 namespace XALAN_CPP_NAMESPACE {
38 
39 
40 
42 {
43 public:
44 
46 
47  /**
48  * Perform static initialization. See class XPathInit.
49  */
50  static void
51  initialize(MemoryManager& theManager);
52 
53  /**
54  * Perform static shut down. See class XPathInit.
55  */
56  static void
58 
59  /**
60  * Construct an XUnknown object from a string.
61  *
62  * @param name The source string.
63  * @param theMemoryManager The MemoryManager instance.
64  */
66  const XalanDOMString& name,
67  MemoryManager& theMemoryManager);
68 
69  /**
70  * Construct an XUnknown from another one.
71  *
72  * @param source The XUnknown instance to copy.
73  * @param theMemoryManager The MemoryManager instance.
74  */
76  const XUnknown& source,
77  MemoryManager& theMemoryManager);
78 
79  /**
80  * Create an XUnknown object from a string.
81  *
82  * @param name the source string.
83  * @param theMemoryManager The MemoryManager instance.
84  */
85  static XUnknown*
87  const XalanDOMString& name,
88  MemoryManager& theMemoryManager);
89 
90  virtual
92 
93  // These methods are inherited from XObject ...
94  virtual const XalanDOMString&
95  getTypeString() const;
96 
97  virtual double
98  num(XPathExecutionContext& executionContext) const;
99 
100  virtual double
101  num() const;
102 
103  virtual bool
104  boolean(XPathExecutionContext& executionContext) const;
105 
106  virtual const XalanDOMString&
107  str(XPathExecutionContext& executionContext) const;
108 
109  virtual const XalanDOMString&
110  str() const;
111 
112  virtual void
114  XPathExecutionContext& executionContext,
115  FormatterListener& formatterListener,
116  MemberFunctionPtr function) const;
117 
118  virtual void
120  FormatterListener& formatterListener,
121  MemberFunctionPtr function) const;
122 
123  virtual void
125  XPathExecutionContext& executionContext,
126  XalanDOMString& theBuffer) const;
127 
128  virtual void
129  str(XalanDOMString& theBuffer) const;
130 
131  virtual double
132  stringLength(XPathExecutionContext& executionContext) const;
133 
134  virtual void
136 
137  virtual void
139 
140 private:
141  // undefined
142  XUnknown(const XUnknown& source);
143  XUnknown();
144 
145  XalanDOMString m_value;
146 
147  static XalanDOMString s_unknownString;
148 };
149 
150 
151 
152 }
153 
154 
155 
156 #endif // XUKNOWN_HEADER_GUARD_1357924680
xalanc::XUnknown::str
virtual void str(XPathExecutionContext &executionContext, XalanDOMString &theBuffer) const
Append the string value directly a string.
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
xalanc::XUnknown::create
static XUnknown * create(const XalanDOMString &name, MemoryManager &theMemoryManager)
Create an XUnknown object from a string.
xalanc::XUnknown::getTypeString
virtual const XalanDOMString & getTypeString() const
Given a request type, return the equivalent string.
xalanc::XUnknown::str
virtual const XalanDOMString & str(XPathExecutionContext &executionContext) const
Cast result object to a string.
xalanc::XUnknown::~XUnknown
virtual ~XUnknown()
XalanDOMString.hpp
xalanc::XUnknown::num
virtual double num() const
Cast result object to a number.
xalanc::XUnknown::boolean
virtual bool boolean(XPathExecutionContext &executionContext) const
Cast result object to a boolean.
xalanc::XUnknown::ParentType
XObject ParentType
Definition: XUnknown.hpp:45
xalanc::XUnknown::num
virtual double num(XPathExecutionContext &executionContext) const
Cast result object to a number.
xalanc::XUnknown::str
virtual const XalanDOMString & str() const
Cast result object to a string.
XALAN_XPATH_EXPORT
#define XALAN_XPATH_EXPORT
Definition: XPathDefinitions.hpp:35
xalanc::XUnknown::XUnknown
XUnknown(const XalanDOMString &name, MemoryManager &theMemoryManager)
Construct an XUnknown object from a string.
xalanc::XObjectTypeCallback
The purpose of this class is to provide a way to get the "preferred" or closest matching type for XOb...
Definition: XObjectTypeCallback.hpp:55
xalanc::XObject
Class to hold XPath return types.
Definition: XObject.hpp:64
xalanc::XUnknown::str
virtual void str(FormatterListener &formatterListener, MemberFunctionPtr function) const
Send the string value to a FormatterListener instance.
xalanc::XUnknown::str
virtual void str(XPathExecutionContext &executionContext, FormatterListener &formatterListener, MemberFunctionPtr function) const
Send the string value to a FormatterListener instance.
xalanc::XUnknown::stringLength
virtual double stringLength(XPathExecutionContext &executionContext) const
Get the length of the string value of the instance.
xalanc::XUnknown::ProcessXObjectTypeCallback
virtual void ProcessXObjectTypeCallback(XObjectTypeCallback &theCallbackObject)
Process a callback request for preferred type information.
xalanc::XUnknown::str
virtual void str(XalanDOMString &theBuffer) const
Append the string value directly a string.
xalanc::XUnknown::terminate
static void terminate()
Perform static shut down.
xalanc::FormatterListener
A SAX-based formatter interface for the XSL processor.
Definition: FormatterListener.hpp:57
xalanc::XPathExecutionContext
Definition: XPathExecutionContext.hpp:83
xalanc::XUnknown::ProcessXObjectTypeCallback
virtual void ProcessXObjectTypeCallback(XObjectTypeCallback &theCallbackObject) const
Process a callback request for preferred type information.
xalanc::XUnknown::XUnknown
XUnknown(const XUnknown &source, MemoryManager &theMemoryManager)
Construct an XUnknown from another one.
xalanc::XalanDOMString
Definition: XalanDOMString.hpp:46
xalanc::XUnknown
Definition: XUnknown.hpp:42
xalanc::XUnknown::initialize
static void initialize(MemoryManager &theManager)
Perform static initialization.
XObject.hpp
XPathDefinitions.hpp