2
* Licensed to the Apache Software Foundation (ASF) under one or more
3
* contributor license agreements. See the NOTICE file distributed with
4
* this work for additional information regarding copyright ownership.
5
* The ASF licenses this file to You under the Apache License, Version 2.0
6
* (the "License"); you may not use this file except in compliance with
7
* the License. You may obtain a copy of the License at
9
* http://www.apache.org/licenses/LICENSE-2.0
11
* Unless required by applicable law or agreed to in writing, software
12
* distributed under the License is distributed on an "AS IS" BASIS,
13
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
* See the License for the specific language governing permissions and
15
* limitations under the License.
19
* $Id: IC_Selector.hpp 676911 2008-07-15 13:27:32Z amassari $
22
#if !defined(XERCESC_INCLUDE_GUARD_IC_SELECTOR_HPP)
23
#define XERCESC_INCLUDE_GUARD_IC_SELECTOR_HPP
26
// ---------------------------------------------------------------------------
28
// ---------------------------------------------------------------------------
29
#include <xercesc/validators/schema/identity/XPathMatcher.hpp>
31
#include <xercesc/internal/XSerializable.hpp>
33
XERCES_CPP_NAMESPACE_BEGIN
35
// ---------------------------------------------------------------------------
36
// Forward Declaration
37
// ---------------------------------------------------------------------------
41
class VALIDATORS_EXPORT IC_Selector : public XSerializable, public XMemory
44
// -----------------------------------------------------------------------
45
// Constructors/Destructor
46
// -----------------------------------------------------------------------
47
IC_Selector(XercesXPath* const xpath,
48
IdentityConstraint* const identityConstraint);
51
// -----------------------------------------------------------------------
53
// -----------------------------------------------------------------------
54
bool operator== (const IC_Selector& other) const;
55
bool operator!= (const IC_Selector& other) const;
57
// -----------------------------------------------------------------------
59
// -----------------------------------------------------------------------
60
XercesXPath* getXPath() const { return fXPath; }
61
IdentityConstraint* getIdentityConstraint() const { return fIdentityConstraint; }
63
// -----------------------------------------------------------------------
65
// -----------------------------------------------------------------------
66
XPathMatcher* createMatcher(FieldActivator* const fieldActivator,
67
const int initialDepth,
68
MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
71
* Support for Serialization/De-serialization
73
DECL_XSERIALIZABLE(IC_Selector)
75
IC_Selector(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
78
// -----------------------------------------------------------------------
79
// Unimplemented contstructors and operators
80
// -----------------------------------------------------------------------
81
IC_Selector(const IC_Selector& other);
82
IC_Selector& operator= (const IC_Selector& other);
84
// -----------------------------------------------------------------------
86
// -----------------------------------------------------------------------
88
IdentityConstraint* fIdentityConstraint;
92
class VALIDATORS_EXPORT SelectorMatcher : public XPathMatcher
95
// -----------------------------------------------------------------------
96
// Constructors/Destructor
97
// -----------------------------------------------------------------------
100
int getInitialDepth() const { return fInitialDepth; }
102
// -----------------------------------------------------------------------
103
// XMLDocumentHandler methods
104
// -----------------------------------------------------------------------
105
void startDocumentFragment();
106
void startElement(const XMLElementDecl& elemDecl,
107
const unsigned int urlId,
108
const XMLCh* const elemPrefix,
109
const RefVectorOf<XMLAttr>& attrList,
110
const XMLSize_t attrCount);
111
void endElement(const XMLElementDecl& elemDecl,
112
const XMLCh* const elemContent);
115
// -----------------------------------------------------------------------
116
// Constructors/Destructor
117
// -----------------------------------------------------------------------
118
SelectorMatcher(XercesXPath* const anXPath,
119
IC_Selector* const selector,
120
FieldActivator* const fieldActivator,
121
const int initialDepth,
122
MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
124
// -----------------------------------------------------------------------
125
// Unimplemented contstructors and operators
126
// -----------------------------------------------------------------------
127
SelectorMatcher(const SelectorMatcher& other);
128
SelectorMatcher& operator= (const SelectorMatcher& other);
130
// -----------------------------------------------------------------------
132
// -----------------------------------------------------------------------
133
friend class IC_Selector;
135
// -----------------------------------------------------------------------
137
// -----------------------------------------------------------------------
141
IC_Selector* fSelector;
142
FieldActivator* fFieldActivator;
145
XERCES_CPP_NAMESPACE_END
150
* End of file IC_Selector.hpp