http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Home

Readme
Release Info

Installation
Download
Build

FAQs
Samples
API Docs

DOM C++ Binding
Programming
Migration Guide

Feedback
Bug-Reporting
PDF Document

CVS Repository
Mail Archive

API Docs for SAX and DOM
 

Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

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  * $Log: XSAttributeUse.hpp,v $
00019  * Revision 1.9  2004/09/08 13:56:08  peiyongz
00020  * Apache License Version 2.0
00021  *
00022  * Revision 1.8  2004/09/02 19:08:09  cargilld
00023  * Fix API Doc warning message
00024  *
00025  * Revision 1.7  2003/12/19 23:02:43  cargilld
00026  * Fix compiler messages on OS390.
00027  *
00028  * Revision 1.6  2003/12/17 20:50:34  knoaman
00029  * PSVI: fix for annotation of attributes in attributeGroup/derived types
00030  *
00031  * Revision 1.5  2003/11/21 17:19:30  knoaman
00032  * PSVI update.
00033  *
00034  * Revision 1.4  2003/11/14 22:47:53  neilg
00035  * fix bogus log message from previous commit...
00036  *
00037  * Revision 1.3  2003/11/14 22:33:30  neilg
00038  * Second phase of schema component model implementation.  
00039  * Implement XSModel, XSNamespaceItem, and the plumbing necessary
00040  * to connect them to the other components.
00041  * Thanks to David Cargill.
00042  *
00043  * Revision 1.2  2003/11/06 15:30:04  neilg
00044  * first part of PSVI/schema component model implementation, thanks to David Cargill.  This covers setting the PSVIHandler on parser objects, as well as implementing XSNotation, XSSimpleTypeDefinition, XSIDCDefinition, and most of XSWildcard, XSComplexTypeDefinition, XSElementDeclaration, XSAttributeDeclaration and XSAttributeUse.
00045  *
00046  * Revision 1.1  2003/09/16 14:33:36  neilg
00047  * PSVI/schema component model classes, with Makefile/configuration changes necessary to build them
00048  *
00049  */
00050 
00051 #if !defined(XSATTRIBUTEUSE_HPP)
00052 #define XSATTRIBUTEUSE_HPP
00053 
00054 #include <xercesc/framework/psvi/XSObject.hpp>
00055 
00056 XERCES_CPP_NAMESPACE_BEGIN
00057 
00065 // forward declarations
00066 class XSAttributeDeclaration;
00067 
00068 class  XSAttributeUse : public XSObject
00069 {
00070 public:
00071 
00072     //  Constructors and Destructor
00073     // -----------------------------------------------------------------------
00076 
00083     XSAttributeUse
00084     (
00085         XSAttributeDeclaration* const xsAttDecl,
00086         XSModel* const xsModel,
00087         MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager
00088     );
00089 
00091 
00094     ~XSAttributeUse();
00096 
00097     //---------------------
00101 
00107     bool getRequired() const;
00108 
00113     XSAttributeDeclaration *getAttrDeclaration() const;
00114 
00118     XSConstants::VALUE_CONSTRAINT getConstraintType() const;
00119 
00123     const XMLCh *getConstraintValue();
00124 
00126 
00127     //----------------------------------
00131 
00133 
00134 private:
00135 
00136     // set data
00137     void set
00138     (
00139         const bool isRequired
00140         , XSConstants::VALUE_CONSTRAINT constraintType
00141         , const XMLCh* const constraintValue
00142     );
00143 
00144     friend class XSObjectFactory;
00145     
00146     // -----------------------------------------------------------------------
00147     //  Unimplemented constructors and operators
00148     // -----------------------------------------------------------------------
00149     XSAttributeUse(const XSAttributeUse&);
00150     XSAttributeUse & operator=(const XSAttributeUse &);
00151 
00152 protected:
00153 
00154     // -----------------------------------------------------------------------
00155     //  data members
00156     // -----------------------------------------------------------------------
00157     bool                          fRequired;
00158     XSConstants::VALUE_CONSTRAINT fConstraintType;   
00159     const XMLCh*                  fConstraintValue;
00160     XSAttributeDeclaration*       fXSAttributeDeclaration;
00161 };
00162 
00163 inline XSAttributeDeclaration *XSAttributeUse::getAttrDeclaration() const
00164 {
00165     return fXSAttributeDeclaration;
00166 }
00167 
00168 inline bool XSAttributeUse::getRequired() const
00169 {
00170     return fRequired;
00171 }
00172 
00173 inline XSConstants::VALUE_CONSTRAINT XSAttributeUse::getConstraintType() const
00174 {
00175     return fConstraintType;
00176 }
00177 
00178 const inline XMLCh *XSAttributeUse::getConstraintValue()
00179 {
00180     return fConstraintValue;
00181 }
00182 
00183 XERCES_CPP_NAMESPACE_END
00184 
00185 #endif


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