Xerces-C++: XSAttributeUse.hpp Source File

| API Docs for SAX and DOM |
| Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages # XSAttributeUse.hpp Go to the documentation of this file.
    00001 /*
    00002  * Copyright 2003,2004 The Apache Software Foundation.
    00003  *
    00004  * Licensed under the Apache License, Version 2.0 (the "License");
    00005  * you may not use this file except in compliance with the License.
    00006  * You may obtain a copy of the License at
    00007  *
    00008  *      http://www.apache.org/licenses/LICENSE-2.0
    00009  *
    00010  * Unless required by applicable law or agreed to in writing, software
    00011  * distributed under the License is distributed on an "AS IS" BASIS,
    00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00013  * See the License for the specific language governing permissions and
    00014  * limitations under the License.
    00015  */
    00016
    00017 /*
    00018  * $Id: XSAttributeUse.hpp 191054 2005-06-17 02:56:35Z jberry $
    00019  */
    00020
    00021 #if !defined(XSATTRIBUTEUSE_HPP)
    00022 #define XSATTRIBUTEUSE_HPP
    00023
    00024 #include <xercesc/framework/psvi/XSObject.hpp>
    00025
    00026 XERCES_CPP_NAMESPACE_BEGIN
    00027
    00035 // forward declarations
    00036 class XSAttributeDeclaration;
    00037
    00038 class  XSAttributeUse : public XSObject
    00039 {
    00040 public:
    00041
    00042     //  Constructors and Destructor
    00043     // -----------------------------------------------------------------------
    00046
    00053     XSAttributeUse
    00054     (
    00055         XSAttributeDeclaration* const xsAttDecl,
    00056         XSModel* const xsModel,
    00057         MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
    00058     );
    00059
    00061
    00064     ~XSAttributeUse();
    00066
    00067     //---------------------
    00071
    00077     bool getRequired() const;
    00078
    00083     XSAttributeDeclaration *getAttrDeclaration() const;
    00084
    00088     XSConstants::VALUE_CONSTRAINT getConstraintType() const;
    00089
    00093     const XMLCh *getConstraintValue();
    00094
    00096
    00097     //----------------------------------
    00101
    00103
    00104 private:
    00105
    00106     // set data
    00107     void set
    00108     (
    00109         const bool isRequired
    00110         , XSConstants::VALUE_CONSTRAINT constraintType
    00111         , const XMLCh* const constraintValue
    00112     );
    00113
    00114     friend class XSObjectFactory;
    00115
    00116     // -----------------------------------------------------------------------
    00117     //  Unimplemented constructors and operators
    00118     // -----------------------------------------------------------------------
    00119     XSAttributeUse(const XSAttributeUse&);
    00120     XSAttributeUse & operator=(const XSAttributeUse &);
    00121
    00122 protected:
    00123
    00124     // -----------------------------------------------------------------------
    00125     //  data members
    00126     // -----------------------------------------------------------------------
    00127     bool                          fRequired;
    00128     XSConstants::VALUE_CONSTRAINT fConstraintType;
    00129     const XMLCh*                  fConstraintValue;
    00130     XSAttributeDeclaration*       fXSAttributeDeclaration;
    00131 };
    00132
    00133 inline XSAttributeDeclaration *XSAttributeUse::getAttrDeclaration() const
    00134 {
    00135     return fXSAttributeDeclaration;
    00136 }
    00137
    00138 inline bool XSAttributeUse::getRequired() const
    00139 {
    00140     return fRequired;
    00141 }
    00142
    00143 inline XSConstants::VALUE_CONSTRAINT XSAttributeUse::getConstraintType() const
    00144 {
    00145     return fConstraintType;
    00146 }
    00147
    00148 inline const XMLCh *XSAttributeUse::getConstraintValue()
    00149 {
    00150     return fConstraintValue;
    00151 }
    00152
    00153 XERCES_CPP_NAMESPACE_END
    00154
    00155 #endif

Copyright © 1994-2004 The Apache Software Foundation. All Rights Reserved.