|
||||
File indexing completed on 2025-01-18 10:15:18
0001 /* 0002 * Licensed to the Apache Software Foundation (ASF) under one or more 0003 * contributor license agreements. See the NOTICE file distributed with 0004 * this work for additional information regarding copyright ownership. 0005 * The ASF licenses this file to You under the Apache License, Version 2.0 0006 * (the "License"); you may not use this file except in compliance with 0007 * the License. You may obtain a copy of the License at 0008 * 0009 * http://www.apache.org/licenses/LICENSE-2.0 0010 * 0011 * Unless required by applicable law or agreed to in writing, software 0012 * distributed under the License is distributed on an "AS IS" BASIS, 0013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 0014 * See the License for the specific language governing permissions and 0015 * limitations under the License. 0016 */ 0017 0018 /* 0019 * $Id$ 0020 */ 0021 0022 #if !defined(XERCESC_INCLUDE_GUARD_IC_SELECTOR_HPP) 0023 #define XERCESC_INCLUDE_GUARD_IC_SELECTOR_HPP 0024 0025 0026 // --------------------------------------------------------------------------- 0027 // Includes 0028 // --------------------------------------------------------------------------- 0029 #include <xercesc/validators/schema/identity/XPathMatcher.hpp> 0030 0031 #include <xercesc/internal/XSerializable.hpp> 0032 0033 XERCES_CPP_NAMESPACE_BEGIN 0034 0035 // --------------------------------------------------------------------------- 0036 // Forward Declaration 0037 // --------------------------------------------------------------------------- 0038 class FieldActivator; 0039 0040 0041 class VALIDATORS_EXPORT IC_Selector : public XSerializable, public XMemory 0042 { 0043 public: 0044 // ----------------------------------------------------------------------- 0045 // Constructors/Destructor 0046 // ----------------------------------------------------------------------- 0047 IC_Selector(XercesXPath* const xpath, 0048 IdentityConstraint* const identityConstraint); 0049 ~IC_Selector(); 0050 0051 // ----------------------------------------------------------------------- 0052 // operators 0053 // ----------------------------------------------------------------------- 0054 bool operator== (const IC_Selector& other) const; 0055 bool operator!= (const IC_Selector& other) const; 0056 0057 // ----------------------------------------------------------------------- 0058 // Getter methods 0059 // ----------------------------------------------------------------------- 0060 XercesXPath* getXPath() const { return fXPath; } 0061 IdentityConstraint* getIdentityConstraint() const { return fIdentityConstraint; } 0062 0063 // ----------------------------------------------------------------------- 0064 // Factory methods 0065 // ----------------------------------------------------------------------- 0066 XPathMatcher* createMatcher(FieldActivator* const fieldActivator, 0067 const int initialDepth, 0068 MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); 0069 0070 /*** 0071 * Support for Serialization/De-serialization 0072 ***/ 0073 DECL_XSERIALIZABLE(IC_Selector) 0074 0075 IC_Selector(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); 0076 0077 private: 0078 // ----------------------------------------------------------------------- 0079 // Unimplemented constructors and operators 0080 // ----------------------------------------------------------------------- 0081 IC_Selector(const IC_Selector& other); 0082 IC_Selector& operator= (const IC_Selector& other); 0083 0084 // ----------------------------------------------------------------------- 0085 // Data members 0086 // ----------------------------------------------------------------------- 0087 XercesXPath* fXPath; 0088 IdentityConstraint* fIdentityConstraint; 0089 }; 0090 0091 0092 class VALIDATORS_EXPORT SelectorMatcher : public XPathMatcher 0093 { 0094 public: 0095 // ----------------------------------------------------------------------- 0096 // Constructors/Destructor 0097 // ----------------------------------------------------------------------- 0098 ~SelectorMatcher(); 0099 0100 int getInitialDepth() const { return fInitialDepth; } 0101 0102 // ----------------------------------------------------------------------- 0103 // XMLDocumentHandler methods 0104 // ----------------------------------------------------------------------- 0105 virtual void startDocumentFragment(); 0106 virtual void startElement(const XMLElementDecl& elemDecl, 0107 const unsigned int urlId, 0108 const XMLCh* const elemPrefix, 0109 const RefVectorOf<XMLAttr>& attrList, 0110 const XMLSize_t attrCount, 0111 ValidationContext* validationContext = 0); 0112 virtual void endElement(const XMLElementDecl& elemDecl, 0113 const XMLCh* const elemContent, 0114 ValidationContext* validationContext = 0, 0115 DatatypeValidator* actualValidator = 0); 0116 0117 private: 0118 // ----------------------------------------------------------------------- 0119 // Constructors/Destructor 0120 // ----------------------------------------------------------------------- 0121 SelectorMatcher(XercesXPath* const anXPath, 0122 IC_Selector* const selector, 0123 FieldActivator* const fieldActivator, 0124 const int initialDepth, 0125 MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager); 0126 0127 // ----------------------------------------------------------------------- 0128 // Unimplemented constructors and operators 0129 // ----------------------------------------------------------------------- 0130 SelectorMatcher(const SelectorMatcher& other); 0131 SelectorMatcher& operator= (const SelectorMatcher& other); 0132 0133 // ----------------------------------------------------------------------- 0134 // Friends 0135 // ----------------------------------------------------------------------- 0136 friend class IC_Selector; 0137 0138 // ----------------------------------------------------------------------- 0139 // Data members 0140 // ----------------------------------------------------------------------- 0141 int fInitialDepth; 0142 int fElementDepth; 0143 int* fMatchedDepth; 0144 IC_Selector* fSelector; 0145 FieldActivator* fFieldActivator; 0146 }; 0147 0148 XERCES_CPP_NAMESPACE_END 0149 0150 #endif 0151 0152 /** 0153 * End of file IC_Selector.hpp 0154 */ 0155
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |