Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:14:52

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_XSIDCDEFINITION_HPP)
0023 #define XERCESC_INCLUDE_GUARD_XSIDCDEFINITION_HPP
0024 
0025 #include <xercesc/framework/psvi/XSObject.hpp>
0026 
0027 XERCES_CPP_NAMESPACE_BEGIN
0028 
0029 /**
0030  * This class describes all properties of a Schema Identity Constraint
0031  * Definition component.
0032  * This is *always* owned by the validator /parser object from which
0033  * it is obtained.  
0034  */
0035 
0036 // forward declarations
0037 class XSAnnotation;
0038 class IdentityConstraint;
0039 
0040 class XMLPARSER_EXPORT XSIDCDefinition : public XSObject
0041 {
0042 public:
0043 
0044     // Identity Constraints
0045     enum IC_CATEGORY {
0046         /**
0047          * 
0048          */
0049         IC_KEY                    = 1,
0050         /**
0051          * 
0052          */
0053         IC_KEYREF                 = 2,
0054         /**
0055          * 
0056          */
0057         IC_UNIQUE                 = 3
0058     };
0059 
0060     //  Constructors and Destructor
0061     // -----------------------------------------------------------------------
0062     /** @name Constructors */
0063     //@{
0064 
0065     /**
0066       * The default constructor 
0067       *
0068       * @param  identityConstraint
0069       * @param  keyIC
0070       * @param  headAnnot
0071       * @param  stringList
0072       * @param  xsModel
0073       * @param  manager     The configurable memory manager
0074       */
0075     XSIDCDefinition
0076     (
0077         IdentityConstraint* const identityConstraint
0078         , XSIDCDefinition*  const keyIC
0079         , XSAnnotation* const     headAnnot
0080         , StringList* const       stringList
0081         , XSModel* const          xsModel
0082         , MemoryManager* const    manager = XMLPlatformUtils::fgMemoryManager
0083     );
0084 
0085     //@};
0086 
0087     /** @name Destructor */
0088     //@{
0089     ~XSIDCDefinition();
0090     //@}
0091 
0092     //---------------------
0093     /** @name overridden XSXSObject methods */
0094 
0095     //@{
0096 
0097     /**
0098      * The name of type <code>NCName</code> of this declaration as defined in 
0099      * XML Namespaces.
0100      */
0101     const XMLCh* getName() const;
0102 
0103     /**
0104      *  The [target namespace] of this object, or <code>null</code> if it is 
0105      * unspecified. 
0106      */
0107     const XMLCh* getNamespace() const;
0108 
0109     /**
0110      * A namespace schema information item corresponding to the target 
0111      * namespace of the component, if it's globally declared; or null 
0112      * otherwise.
0113      */
0114     XSNamespaceItem *getNamespaceItem();
0115 
0116     //@}
0117 
0118     //---------------------
0119     /** @name XSIDCDefinition methods */
0120 
0121     //@{
0122 
0123     /**
0124      * [identity-constraint category]: one of IC_KEY, IC_KEYREF or IC_UNIQUE. 
0125      */
0126     IC_CATEGORY getCategory() const;
0127 
0128     /**
0129      * [selector]: a restricted XPath expression. 
0130      */
0131     const XMLCh *getSelectorStr();
0132 
0133     /**
0134      * [fields]: a non-empty list of restricted XPath ([XPath]) expressions. 
0135      */
0136     StringList *getFieldStrs();
0137 
0138     /**
0139      * [referenced key]: required if [identity-constraint category] is IC_KEYREF, 
0140      * forbidden otherwise (when an identity-constraint definition with [
0141      * identity-constraint category] equal to IC_KEY or IC_UNIQUE). 
0142      */
0143     XSIDCDefinition *getRefKey() const;
0144 
0145     /**
0146      * A set of [annotations]. 
0147      */
0148     XSAnnotationList *getAnnotations();
0149 
0150     //@}
0151 
0152     //----------------------------------
0153     /** methods needed by implementation */
0154 
0155     //@{
0156 
0157     //@}
0158 private:
0159 
0160     // -----------------------------------------------------------------------
0161     //  Unimplemented constructors and operators
0162     // -----------------------------------------------------------------------
0163     XSIDCDefinition(const XSIDCDefinition&);
0164     XSIDCDefinition & operator=(const XSIDCDefinition &);
0165 
0166 protected:
0167 
0168     // -----------------------------------------------------------------------
0169     //  data members
0170     // -----------------------------------------------------------------------
0171     IdentityConstraint* fIdentityConstraint;
0172     XSIDCDefinition*    fKey;
0173     StringList*         fStringList;
0174     XSAnnotationList*   fXSAnnotationList;
0175 };
0176 
0177 
0178 inline StringList* XSIDCDefinition::getFieldStrs()
0179 {
0180     return fStringList;
0181 }
0182 
0183 inline XSIDCDefinition* XSIDCDefinition::getRefKey() const
0184 {
0185     return fKey;
0186 }
0187 
0188 XERCES_CPP_NAMESPACE_END
0189 
0190 #endif