|
||||
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_IDENTITYCONSTRAINT_HANDLER_HPP) 0023 #define XERCESC_INCLUDE_GUARD_IDENTITYCONSTRAINT_HANDLER_HPP 0024 0025 // --------------------------------------------------------------------------- 0026 // Includes 0027 // --------------------------------------------------------------------------- 0028 #include <xercesc/validators/schema/identity/ValueStoreCache.hpp> 0029 #include <xercesc/validators/schema/identity/XPathMatcherStack.hpp> 0030 0031 XERCES_CPP_NAMESPACE_BEGIN 0032 0033 // --------------------------------------------------------------------------- 0034 // Forward Declarations 0035 // --------------------------------------------------------------------------- 0036 0037 class XMLScanner; 0038 class FieldActivator; 0039 class MemoryManager; 0040 class XMLElementDecl; 0041 0042 class VALIDATORS_EXPORT IdentityConstraintHandler: public XMemory 0043 { 0044 public: 0045 0046 // ----------------------------------------------------------------------- 0047 // Constructors/Destructor 0048 // ----------------------------------------------------------------------- 0049 virtual ~IdentityConstraintHandler(); 0050 0051 IdentityConstraintHandler 0052 ( 0053 XMLScanner* const scanner 0054 , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager 0055 ); 0056 0057 // ----------------------------------------------------------------------- 0058 // Getter methods 0059 // ----------------------------------------------------------------------- 0060 inline XMLSize_t getMatcherCount() const; 0061 0062 // ----------------------------------------------------------------------- 0063 // Setter methods 0064 // ----------------------------------------------------------------------- 0065 0066 // ----------------------------------------------------------------------- 0067 // Access methods 0068 // ----------------------------------------------------------------------- 0069 inline void endDocument(); 0070 0071 void deactivateContext 0072 ( 0073 SchemaElementDecl* const elem 0074 , const XMLCh* const content 0075 , ValidationContext* validationContext = 0 0076 , DatatypeValidator* actualValidator = 0); 0077 0078 void activateIdentityConstraint 0079 ( 0080 SchemaElementDecl* const elem 0081 , int elemDepth 0082 , const unsigned int uriId 0083 , const XMLCh* const elemPrefix 0084 , const RefVectorOf<XMLAttr>& attrList 0085 , const XMLSize_t attrCount 0086 , ValidationContext* validationContext = 0 ); 0087 0088 void reset(); 0089 0090 private: 0091 // ----------------------------------------------------------------------- 0092 // Unimplemented constructors and operators 0093 // ----------------------------------------------------------------------- 0094 IdentityConstraintHandler(const IdentityConstraintHandler& other); 0095 IdentityConstraintHandler& operator= (const IdentityConstraintHandler& other); 0096 0097 // ----------------------------------------------------------------------- 0098 // CleanUp methods 0099 // ----------------------------------------------------------------------- 0100 void cleanUp(); 0101 0102 // ----------------------------------------------------------------------- 0103 // Helper 0104 // ----------------------------------------------------------------------- 0105 void activateSelectorFor( 0106 IdentityConstraint* const ic 0107 , const int initialDepth 0108 ) ; 0109 0110 // ----------------------------------------------------------------------- 0111 // Data members 0112 // 0113 // fMatcherStack 0114 // Stack of active XPath matchers for identity constraints. All 0115 // active XPath matchers are notified of startElement, characters 0116 // and endElement callbacks in order to perform their matches. 0117 // 0118 // fValueStoreCache 0119 // Cache of value stores for identity constraint fields. 0120 // 0121 // fFieldActivator 0122 // Activates fields within a certain scope when a selector matches 0123 // its xpath. 0124 // 0125 // ----------------------------------------------------------------------- 0126 XMLScanner* fScanner; 0127 MemoryManager* fMemoryManager; 0128 0129 XPathMatcherStack* fMatcherStack; 0130 ValueStoreCache* fValueStoreCache; 0131 FieldActivator* fFieldActivator; 0132 0133 }; 0134 0135 0136 // --------------------------------------------------------------------------- 0137 // IdentityConstraintHandler: 0138 // --------------------------------------------------------------------------- 0139 0140 inline 0141 void IdentityConstraintHandler::endDocument() 0142 { 0143 fValueStoreCache->endDocument(); 0144 } 0145 0146 inline 0147 XMLSize_t IdentityConstraintHandler::getMatcherCount() const 0148 { 0149 return fMatcherStack->getMatcherCount(); 0150 } 0151 0152 XERCES_CPP_NAMESPACE_END 0153 0154 #endif 0155 0156 /** 0157 * End of file IdentityConstraintHandler.hpp 0158 */ 0159
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |