Xalan-C++ API Reference  1.12.0
FunctionID.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(FUNCTIONID_HEADER_GUARD_1357924680)
19 #define FUNCTIONID_HEADER_GUARD_1357924680
20 
21 
22 
23 // Base header file. Must be first.
25 
26 
27 
31 
32 
33 
34 // Base class header files...
37 
38 
39 
42 
43 
44 
47 
48 
49 
50 namespace XALAN_CPP_NAMESPACE {
51 
52 
53 
54 /**
55  * XPath implementation of "id" function.
56  */
58 {
59 public:
60 
62 
63  FunctionID();
64 
65  virtual
66  ~FunctionID();
67 
68  // These methods are inherited from Function ...
69 
70  virtual XObjectPtr
71  execute(
72  XPathExecutionContext& executionContext,
73  XalanNode* context,
74  const XObjectPtr arg1,
75  const Locator* locator) const;
76 
77  using ParentType::execute;
78 
79  virtual FunctionID*
80  clone(MemoryManager& theManager) const;
81 
82 protected:
83 
84  virtual const XalanDOMString&
85  getError(XalanDOMString& theResult) const;
86 
87 private:
88 
89  class FunctionIDXObjectTypeCallback : public XObjectTypeCallback
90  {
91  public:
92 
93  FunctionIDXObjectTypeCallback(
94  XPathExecutionContext& theExecutionContext,
95  XalanDOMString& theString);
96 
97  void
98  processCallback(const XObject& theXObject);
99 
100  // These methods are inherited from XObjectTypeCallback ...
101 
102  virtual void
103  Number(
104  const XObject& theXObject,
105  double /* theValue */);
106 
107  virtual void
108  Boolean(
109  const XObject& theXObject,
110  bool /* theValue */);
111 
112  virtual void
113  String(
114  const XObject& theXObject,
115  const XalanDOMString& /* theValue */);
116 
117  virtual void
118  ResultTreeFragment(
119  const XObject& theXObject,
120  const XalanDocumentFragment& /* theValue */);
121 
122  virtual void
123  ResultTreeFragment(
124  const XObject& theXObject,
125  XalanDocumentFragment& /* theValue */);
126 
127  virtual void
128  NodeSet(
129  const XObject& /* theXObject */,
130  const NodeRefListBase& theValue);
131 
132  virtual void
133  Unknown(
134  const XObject& /* theObject */,
135  const XalanDOMString& /* theName */);
136 
137  virtual void
138  Null(const XObject& /* theObject */);
139 
140  private:
141 
142  XalanDOMString& m_resultString;
143 
144  XPathExecutionContext& m_executionContext;
145  };
146 
147  // Not implemented...
148  FunctionID&
149  operator=(const FunctionID&);
150 
151  bool
152  operator==(const FunctionID&) const;
153 };
154 
155 
156 
157 }
158 
159 
160 
161 #endif // FUNCTIONID_HEADER_GUARD_1357924680
MutableNodeRefList.hpp
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
StringTokenizer.hpp
xalanc::XalanNode
Definition: XalanNode.hpp:38
XalanElement.hpp
xalanc::FunctionID::ParentType
Function ParentType
Definition: FunctionID.hpp:61
xalanc::FunctionID
XPath implementation of "id" function.
Definition: FunctionID.hpp:57
xalanc::operator==
bool operator==(const XalanVector< Type > &theLHS, const XalanVector< Type > &theRHS)
Definition: XalanVector.hpp:1118
XALAN_XPATH_EXPORT
#define XALAN_XPATH_EXPORT
Definition: XPathDefinitions.hpp:35
xalanc::XObjectPtr
Class to hold XObjectPtr return types.
Definition: XObject.hpp:883
DOMStringHelper.hpp
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::Function
Definition: Function.hpp:57
XalanNode.hpp
xalanc::XObject
Class to hold XPath return types.
Definition: XObject.hpp:63
XalanDocument.hpp
NodeRefListBase.hpp
xalanc::XPathExecutionContext
Definition: XPathExecutionContext.hpp:82
xalanc::NodeRefListBase
Local implementation of NodeRefList.
Definition: NodeRefListBase.hpp:44
xalanc::XalanDOMString
Definition: XalanDOMString.hpp:45
XObjectTypeCallback.hpp
xalanc::XalanDocumentFragment
Definition: XalanDocumentFragment.hpp:32
Function.hpp
XPathDefinitions.hpp