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
57  terminate();
58 
59  /**
60  * Construct an XUnknown object from a string.
61  *
62  * @param name The source string.
63  * @param theMemoryManager The MemoryManager instance.
64  */
65  XUnknown(
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  */
75  XUnknown(
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*
86  create(
87  const XalanDOMString& name,
88  MemoryManager& theMemoryManager);
89 
90  virtual
91  ~XUnknown();
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
113  str(
114  XPathExecutionContext& executionContext,
115  FormatterListener& formatterListener,
116  MemberFunctionPtr function) const;
117 
118  virtual void
119  str(
120  FormatterListener& formatterListener,
121  MemberFunctionPtr function) const;
122 
123  virtual void
124  str(
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
135  ProcessXObjectTypeCallback(XObjectTypeCallback& theCallbackObject);
136 
137  virtual void
138  ProcessXObjectTypeCallback(XObjectTypeCallback& theCallbackObject) const;
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
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
XalanDOMString.hpp
xalanc::XUnknown::ParentType
XObject ParentType
Definition: XUnknown.hpp:45
XALAN_XPATH_EXPORT
#define XALAN_XPATH_EXPORT
Definition: XPathDefinitions.hpp:35
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:54
xalanc::XObject
Class to hold XPath return types.
Definition: XObject.hpp:63
xalanc::FormatterListener
A SAX-based formatter interface for the XSL processor.
Definition: FormatterListener.hpp:56
xalanc::XPathExecutionContext
Definition: XPathExecutionContext.hpp:82
xalanc::XalanDOMString
Definition: XalanDOMString.hpp:45
xalanc::XUnknown
Definition: XUnknown.hpp:41
XObject.hpp
XPathDefinitions.hpp