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

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

Original Xerces files with import mods for icxercesc

File size: 5.7 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(XercesXPath* const xpath,
49             IdentityConstraint* const identityConstraint);
50        ~IC_Field();
51
52    // -----------------------------------------------------------------------
53    //  operators
54    // -----------------------------------------------------------------------
55    bool operator== (const IC_Field& other) const;
56    bool operator!= (const IC_Field& other) const;
57
58    // -----------------------------------------------------------------------
59    //  Getter methods
60    // -----------------------------------------------------------------------
61    XercesXPath* getXPath() const { return fXPath; }
62    IdentityConstraint* getIdentityConstraint() const { return fIdentityConstraint; }
63
64    // -----------------------------------------------------------------------
65    //  Factory methods
66    // -----------------------------------------------------------------------
67    XPathMatcher* createMatcher
68    (
69        FieldActivator* const fieldActivator
70        , ValueStore* const valueStore
71        , MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
72    );
73
74    /***
75     * Support for Serialization/De-serialization
76     ***/
77    DECL_XSERIALIZABLE(IC_Field)
78
79    IC_Field(MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
80
81private:
82    // -----------------------------------------------------------------------
83    //  Unimplemented constructors and operators
84    // -----------------------------------------------------------------------
85    IC_Field(const IC_Field& other);
86    IC_Field& operator= (const IC_Field& other);
87
88    // -----------------------------------------------------------------------
89    //  Data members
90    // -----------------------------------------------------------------------
91    XercesXPath*        fXPath;
92    IdentityConstraint* fIdentityConstraint;
93};
94
95
96class VALIDATORS_EXPORT FieldMatcher : public XPathMatcher
97{
98public:
99    // -----------------------------------------------------------------------
100    //  Constructors/Destructor
101    // -----------------------------------------------------------------------
102    ~FieldMatcher() {}
103
104    // -----------------------------------------------------------------------
105    //  Getter methods
106    // -----------------------------------------------------------------------
107    ValueStore* getValueStore() const { return fValueStore; }
108    IC_Field*   getField() const { return fField; }
109
110    // -----------------------------------------------------------------------
111    //  Virtual methods
112    // -----------------------------------------------------------------------
113    void matched(const XMLCh* const content, DatatypeValidator* const dv,
114                 const bool isNil);
115
116private:
117    // -----------------------------------------------------------------------
118    //  Constructors/Destructor
119    // -----------------------------------------------------------------------
120    FieldMatcher(XercesXPath* const anXPath,
121                 IC_Field* const aField,
122                 ValueStore* const valueStore,
123                 FieldActivator* const fieldActivator,
124                 MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
125
126    // -----------------------------------------------------------------------
127    //  Unimplemented constructors and operators
128    // -----------------------------------------------------------------------
129    FieldMatcher(const FieldMatcher& other);
130    FieldMatcher& operator= (const FieldMatcher& other);
131
132    // -----------------------------------------------------------------------
133    //  Friends
134    // -----------------------------------------------------------------------
135    friend class IC_Field;
136
137    // -----------------------------------------------------------------------
138    //  Data members
139    // -----------------------------------------------------------------------
140    ValueStore*     fValueStore;
141    IC_Field*       fField;
142    FieldActivator* fFieldActivator;
143};
144
145XERCES_CPP_NAMESPACE_END
146
147#endif
148
149/**
150  * End of file IC_Field.hpp
151  */
152
Note: See TracBrowser for help on using the repository browser.