source: NonGTP/Xerces/xerces/include/xercesc/validators/schema/identity/IC_Field.hpp @ 358

Revision 358, 6.2 KB checked in by bittner, 19 years ago (diff)

xerces added

Line 
1/*
2 * Copyright 2001-2004 The Apache Software Foundation.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/*
18 * $Id: IC_Field.hpp,v 1.7 2004/09/08 13:56:59 peiyongz Exp $
19 */
20
21#if !defined(IC_FIELD_HPP)
22#define IC_FIELD_HPP
23
24
25// ---------------------------------------------------------------------------
26//  Includes
27// ---------------------------------------------------------------------------
28#include <xercesc/validators/schema/identity/XPathMatcher.hpp>
29
30#include <xercesc/internal/XSerializable.hpp>
31
32XERCES_CPP_NAMESPACE_BEGIN
33
34// ---------------------------------------------------------------------------
35//  Forward Declaration
36// ---------------------------------------------------------------------------
37class ValueStore;
38class FieldActivator;
39
40
41class VALIDATORS_EXPORT IC_Field : public XSerializable, public XMemory
42{
43public:
44    // -----------------------------------------------------------------------
45    //  Constructors/Destructor
46    // -----------------------------------------------------------------------
47    IC_Field(XercesXPath* const xpath,
48             IdentityConstraint* const identityConstraint);
49        ~IC_Field();
50
51    // -----------------------------------------------------------------------
52    //  operators
53    // -----------------------------------------------------------------------
54    bool operator== (const IC_Field& other) const;
55    bool operator!= (const IC_Field& other) const;
56
57    // -----------------------------------------------------------------------
58    //  Getter methods
59    // -----------------------------------------------------------------------
60    XercesXPath* getXPath() const { return fXPath; }
61    IdentityConstraint* getIdentityConstraint() const { return fIdentityConstraint; }
62
63    /**
64      * @deprecated
65      */
66    bool getMayMatch() const { return false; }
67
68    // -----------------------------------------------------------------------
69    //  Setter methods
70    // -----------------------------------------------------------------------
71    /**
72      * @deprecated
73      */
74    void setMayMatch(const bool) {}
75
76    // -----------------------------------------------------------------------
77    //  Factory methods
78    // -----------------------------------------------------------------------
79    XPathMatcher* createMatcher
80    (
81        FieldActivator* const fieldActivator
82        , ValueStore* const valueStore
83        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
84    );
85
86    /**
87      * @deprecated
88      */
89    XPathMatcher* createMatcher(ValueStore* const valueStore,
90                                MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
91
92    /***
93     * Support for Serialization/De-serialization
94     ***/
95    DECL_XSERIALIZABLE(IC_Field)
96
97    IC_Field(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
98
99private:
100    // -----------------------------------------------------------------------
101    //  Unimplemented contstructors and operators
102    // -----------------------------------------------------------------------
103    IC_Field(const IC_Field& other);
104    IC_Field& operator= (const IC_Field& other);
105
106    // -----------------------------------------------------------------------
107    //  Data members
108    // -----------------------------------------------------------------------
109    XercesXPath*        fXPath;
110    IdentityConstraint* fIdentityConstraint;
111};
112
113
114class VALIDATORS_EXPORT FieldMatcher : public XPathMatcher
115{
116public:
117    // -----------------------------------------------------------------------
118    //  Constructors/Destructor
119    // -----------------------------------------------------------------------
120    ~FieldMatcher() {}
121
122    // -----------------------------------------------------------------------
123    //  Getter methods
124    // -----------------------------------------------------------------------
125    ValueStore* getValueStore() const { return fValueStore; }
126    IC_Field*   getField() const { return fField; }
127
128    // -----------------------------------------------------------------------
129    //  Virtual methods
130    // -----------------------------------------------------------------------
131    void matched(const XMLCh* const content, DatatypeValidator* const dv,
132                 const bool isNil);
133
134private:
135    // -----------------------------------------------------------------------
136    //  Constructors/Destructor
137    // -----------------------------------------------------------------------
138    FieldMatcher(XercesXPath* const anXPath,
139                 IC_Field* const aField,
140                 ValueStore* const valueStore,
141                 FieldActivator* const fieldActivator,
142                 MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
143
144    // -----------------------------------------------------------------------
145    //  Unimplemented contstructors and operators
146    // -----------------------------------------------------------------------
147    FieldMatcher(const FieldMatcher& other);
148    FieldMatcher& operator= (const FieldMatcher& other);
149
150    // -----------------------------------------------------------------------
151    //  Friends
152    // -----------------------------------------------------------------------
153    friend class IC_Field;
154
155    // -----------------------------------------------------------------------
156    //  Data members
157    // -----------------------------------------------------------------------
158    ValueStore*     fValueStore;
159    IC_Field*       fField;
160    FieldActivator* fFieldActivator;
161};
162
163XERCES_CPP_NAMESPACE_END
164
165#endif
166
167/**
168  * End of file IC_Field.hpp
169  */
170
Note: See TracBrowser for help on using the repository browser.