SourceForge.net Logo
Item.hpp
Go to the documentation of this file.
1/*
2 * Copyright (c) 2001, 2008,
3 * DecisionSoft Limited. All rights reserved.
4 * Copyright (c) 2004, 2015 Oracle and/or its affiliates. All rights reserved.
5 *
6 *
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 */
19
20#ifndef _ITEM_HPP
21#define _ITEM_HPP
22
23#include <xqilla/framework/XQillaExport.hpp>
25#include <xercesc/util/XercesDefs.hpp>
26
27XERCES_CPP_NAMESPACE_BEGIN
28class XMLBuffer;
29XERCES_CPP_NAMESPACE_END
30
31// forward declare when we can
33class DynamicContext;
34class EventHandler;
35
36class XQILLA_API Item : public ReferenceCounted
37{
38public:
40
42 static const XMLCh gXQilla[];
43
44 virtual bool isNode() const = 0;
45
46 virtual bool isAtomicValue() const = 0;
47
48 virtual bool isFunction() const = 0;
49
50 virtual const XMLCh* asString(const DynamicContext* context) const = 0;
51
52 virtual const XMLCh* getTypeURI() const = 0;
53
54 virtual const XMLCh* getTypeName() const = 0;
55
57 virtual void generateEvents(EventHandler *events, const DynamicContext *context,
58 bool preserveNS = true, bool preserveType = true) const = 0;
59
61 virtual void *getInterface(const XMLCh *name) const = 0;
62
64 virtual void typeToBuffer(DynamicContext *context, XERCES_CPP_NAMESPACE_QUALIFIER XMLBuffer &buffer) const = 0;
65
66protected:
67 Item() {}
68
69private:
70 // copy constructor
71 Item (const Item & other);
72 // assignment operation
73 Item & operator=(const Item & item) ;
74};
75
76#endif
77
The execution time dynamic context interface.
Definition: DynamicContext.hpp:39
Definition: EventHandler.hpp:30
Definition: Item.hpp:37
virtual bool isNode() const =0
virtual void generateEvents(EventHandler *events, const DynamicContext *context, bool preserveNS=true, bool preserveType=true) const =0
Generate events for this Item to the given EventHandler.
Item()
Definition: Item.hpp:67
virtual bool isAtomicValue() const =0
virtual const XMLCh * getTypeURI() const =0
virtual const XMLCh * asString(const DynamicContext *context) const =0
RefCountPointer< const Item > Ptr
Definition: Item.hpp:39
virtual void typeToBuffer(DynamicContext *context, xercesc::XMLBuffer &buffer) const =0
Debug method to output the type of the item in SequenceType notation.
virtual const XMLCh * getTypeName() const =0
virtual void * getInterface(const XMLCh *name) const =0
Method for returning arbitrary interfaces from the implementations.
virtual bool isFunction() const =0
Super class for reference counted classes.
Definition: ReferenceCounted.hpp:31
Definition: XPath2MemoryManager.hpp:46