source: icXML/icXML-devel/src/xercesc/validators/schema/identity/IC_Field.hpp @ 3565

Last change on this file since 3565 was 3565, checked in by cameron, 6 years ago

Updates to xercesc sources

File size: 6.3 KB
Line 
1/*
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
8 *
9 *      http://www.apache.org/licenses/LICENSE-2.0
10 *
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.
16 */
17
18/*
19 * $Id: IC_Field.hpp 932887 2010-04-11 13:04:59Z borisk $
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_IC_FIELD_HPP)
23#define XERCESC_INCLUDE_GUARD_IC_FIELD_HPP
24
25
26// ---------------------------------------------------------------------------
27//  Includes
28// ---------------------------------------------------------------------------
29#include <xercesc/validators/schema/identity/XPathMatcher.hpp>
30
31#include <xercesc/internal/XSerializable.hpp>
32
33XERCES_CPP_NAMESPACE_BEGIN
34
35// ---------------------------------------------------------------------------
36//  Forward Declaration
37// ---------------------------------------------------------------------------
38class ValueStore;
39class FieldActivator;
40
41
42class VALIDATORS_EXPORT IC_Field : public XSerializable, public XMemory
43{
44public:
45    // -----------------------------------------------------------------------
46    //  Constructors/Destructor
47    // -----------------------------------------------------------------------
48    IC_Field
49    (
50        XercesXPath* const xpath
51        , IdentityConstraint* const identityConstraint
52    );
53
54
55
56        ~IC_Field();
57
58    // -----------------------------------------------------------------------
59    //  operators
60    // -----------------------------------------------------------------------
61    bool operator== (const IC_Field& other) const;
62    bool operator!= (const IC_Field& other) const;
63
64    // -----------------------------------------------------------------------
65    //  Getter methods
66    // -----------------------------------------------------------------------
67    XercesXPath* getXPath() const { return fXPath; }
68    IdentityConstraint* getIdentityConstraint() const { return fIdentityConstraint; }
69
70    // -----------------------------------------------------------------------
71    //  Factory methods
72    // -----------------------------------------------------------------------
73    XPathMatcher* createMatcher
74    (
75        FieldActivator* const fieldActivator
76        , ValueStore* const valueStore
77        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
78    );
79
80    XPathMatcher* createMatcher
81    (
82        FieldActivator* const fieldActivator
83        , ValueStore* const valueStore
84        , XMLStringPool * const stringPool
85        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
86    );
87
88    /***
89     * Support for Serialization/De-serialization
90     ***/
91    DECL_XSERIALIZABLE(IC_Field)
92
93    IC_Field(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
94
95private:
96    // -----------------------------------------------------------------------
97    //  Unimplemented constructors and operators
98    // -----------------------------------------------------------------------
99    IC_Field(const IC_Field& other);
100    IC_Field& operator= (const IC_Field& other);
101
102    // -----------------------------------------------------------------------
103    //  Data members
104    // -----------------------------------------------------------------------
105    XercesXPath*        fXPath;
106    IdentityConstraint* fIdentityConstraint;
107};
108
109
110class VALIDATORS_EXPORT FieldMatcher : public XPathMatcher
111{
112public:
113    // -----------------------------------------------------------------------
114    //  Constructors/Destructor
115    // -----------------------------------------------------------------------
116    ~FieldMatcher() {}
117
118    // -----------------------------------------------------------------------
119    //  Getter methods
120    // -----------------------------------------------------------------------
121    ValueStore* getValueStore() const { return fValueStore; }
122    IC_Field*   getField() const { return fField; }
123
124    // -----------------------------------------------------------------------
125    //  Virtual methods
126    // -----------------------------------------------------------------------
127    void matched(const XMLCh* const content, DatatypeValidator* const dv,
128                 const bool isNil);
129
130private:
131    // -----------------------------------------------------------------------
132    //  Constructors/Destructor
133    // -----------------------------------------------------------------------
134    FieldMatcher(XercesXPath* const anXPath,
135                 IC_Field* const aField,
136                 ValueStore* const valueStore,
137                 FieldActivator* const fieldActivator,
138                 MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
139
140    FieldMatcher(XercesXPath* const anXPath,
141                 IC_Field* const aField,
142                 ValueStore* const valueStore,
143                 FieldActivator* const fieldActivator,
144                 XMLStringPool* const stringPool,
145                 MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
146
147    // -----------------------------------------------------------------------
148    //  Unimplemented constructors and operators
149    // -----------------------------------------------------------------------
150    FieldMatcher(const FieldMatcher& other);
151    FieldMatcher& operator= (const FieldMatcher& other);
152
153    // -----------------------------------------------------------------------
154    //  Friends
155    // -----------------------------------------------------------------------
156    friend class IC_Field;
157
158    // -----------------------------------------------------------------------
159    //  Data members
160    // -----------------------------------------------------------------------
161    ValueStore*     fValueStore;
162    IC_Field*       fField;
163    FieldActivator* fFieldActivator;
164};
165
166XERCES_CPP_NAMESPACE_END
167
168#endif
169
170/**
171  * End of file IC_Field.hpp
172  */
173
Note: See TracBrowser for help on using the repository browser.