Xalan-C++ API Reference  1.12.0
XNodeSetBase.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(XNODESETBASE_HEADER_GUARD_1357924680)
19 #define XNODESETBASE_HEADER_GUARD_1357924680
20 
21 
22 
23 // Base include file. Must be first.
25 
26 
27 
28 // Base class header file.
29 #include <xalanc/XPath/XObject.hpp>
30 
31 
32 
35 
36 
37 
38 namespace XALAN_CPP_NAMESPACE {
39 
40 
41 
42 /**
43  * Class to hold XPath return types.
44  */
46 {
47 public:
48 
50 
52 
53  virtual
54  ~XNodeSetBase();
55 
56  // These methods are inherited from XObject ...
57 
58 
59  virtual const XalanDOMString&
60  getTypeString() const;
61 
62  virtual double
63  num(XPathExecutionContext& executionContext) const;
64 
65  using ParentType::num;
66 
67  virtual bool
68  boolean(XPathExecutionContext& executionContext) const;
69 
70  virtual const XalanDOMString&
71  str(XPathExecutionContext& executionContext) const;
72 
73  virtual const XalanDOMString&
74  str() const;
75 
76  virtual void
77  str(
78  XPathExecutionContext& executionContext,
79  FormatterListener& formatterListener,
80  MemberFunctionPtr function) const;
81 
82  virtual void
83  str(
84  FormatterListener& formatterListener,
85  MemberFunctionPtr function) const;
86 
87  virtual void
88  str(
89  XPathExecutionContext& executionContext,
90  XalanDOMString& theBuffer) const;
91 
92  virtual void
93  str(XalanDOMString& theBuffer) const;
94 
95  virtual double
96  stringLength(XPathExecutionContext& executionContext) const;
97 
98  virtual const XalanDocumentFragment&
99  rtree() const;
100 
101  virtual const NodeRefListBase&
102  nodeset() const = 0;
103 
104  virtual void
105  ProcessXObjectTypeCallback(XObjectTypeCallback& theCallbackObject);
106 
107  virtual void
108  ProcessXObjectTypeCallback(XObjectTypeCallback& theCallbackObject) const;
109 
110  virtual XalanNode*
111  item(size_type index) const = 0;
112 
113  virtual size_type
114  getLength() const = 0;
115 
116 protected:
117 
118  /**
119  * Create an XNodeSetBase
120  */
121  XNodeSetBase(MemoryManager& theMemoryManager);
122 
123  /**
124  * Create an XNodeSetBase from another.
125  *
126  * @param source object to copy
127  */
128  XNodeSetBase(
129  const XNodeSetBase& source,
130  MemoryManager& theMemoryManager);
131 
132  void
133  clearCachedValues();
134 
135 private:
136 
137  // Not implemented...
138  XNodeSetBase();
139  XNodeSetBase(const XNodeSetBase&);
140  XNodeSetBase&
141  operator=(const XNodeSetBase&);
142 
143  // Data members...
145 
146  mutable XalanDOMString m_cachedStringValue;
147 
148  mutable double m_cachedNumberValue;
149 };
150 
151 
152 
153 }
154 
155 
156 
157 #endif // XNODESETBASE_HEADER_GUARD_1357924680
XALAN_CPP_NAMESPACE
#define XALAN_CPP_NAMESPACE
Xalan-C++ namespace, including major and minor version.
Definition: XalanVersion.hpp:76
xalanc::XalanNode
Definition: XalanNode.hpp:38
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
XNodeSetResultTreeFragProxy.hpp
xalanc::XObject
Class to hold XPath return types.
Definition: XObject.hpp:63
xalanc::XNodeSetBase
Class to hold XPath return types.
Definition: XNodeSetBase.hpp:45
xalanc::XNodeSetBase::size_type
NodeRefListBase::size_type size_type
Definition: XNodeSetBase.hpp:49
NodeRefListBase.hpp
xalanc::XNodeSetResultTreeFragProxy
Definition: XNodeSetResultTreeFragProxy.hpp:40
xalanc::FormatterListener
A SAX-based formatter interface for the XSL processor.
Definition: FormatterListener.hpp:56
xalanc::XPathExecutionContext
Definition: XPathExecutionContext.hpp:82
xalanc::NodeRefListBase
Local implementation of NodeRefList.
Definition: NodeRefListBase.hpp:44
xalanc::XNodeSetBase::ParentType
XObject ParentType
Definition: XNodeSetBase.hpp:51
xalanc::NodeRefListBase::size_type
XalanSize_t size_type
Definition: NodeRefListBase.hpp:53
xalanc::XalanDOMString
Definition: XalanDOMString.hpp:45
xalanc::XalanDocumentFragment
Definition: XalanDocumentFragment.hpp:32
XObject.hpp
XPathDefinitions.hpp