| API Docs for SAX and DOM |
| Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members # PSVIElement.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: PSVIElement.hpp,v $
    00019  * Revision 1.7  2004/09/08 13:56:07  peiyongz
    00020  * Apache License Version 2.0
    00021  *
    00022  * Revision 1.6  2003/11/28 21:18:31  knoaman
    00023  * Make use of canonical representation in PSVIElement
    00024  *
    00025  * Revision 1.5  2003/11/27 22:52:37  knoaman
    00026  * PSVIElement implementation
    00027  *
    00028  * Revision 1.4  2003/11/21 22:34:45  neilg
    00029  * More schema component model implementation, thanks to David Cargill.
    00030  * In particular, this cleans up and completes the XSModel, XSNamespaceItem,
    00031  * XSAttributeDeclaration and XSAttributeGroup implementations.
    00032  *
    00033  * Revision 1.3  2003/11/06 21:50:33  neilg
    00034  * fix compilation errors under gcc 3.3.
    00035  *
    00036  * Revision 1.2  2003/11/06 15:30:04  neilg
    00037  * 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.
    00038  *
    00039  * Revision 1.1  2003/09/16 14:33:36  neilg
    00040  * PSVI/schema component model classes, with Makefile/configuration changes necessary to build them
    00041  *
    00042  */
    00043
    00044 #if !defined(PSVIELEMENT_HPP)
    00045 #define PSVIELEMENT_HPP
    00046
    00047 #include <xercesc/framework/psvi/PSVIItem.hpp>
    00048
    00049 XERCES_CPP_NAMESPACE_BEGIN
    00050
    00058 // forward declarations
    00059 class XSElementDeclaration;
    00060 class XSNotationDeclaration;
    00061 class XSModel;
    00062
    00063 class  PSVIElement : public PSVIItem
    00064 {
    00065 public:
    00066
    00067     //  Constructors and Destructor
    00068     // -----------------------------------------------------------------------
    00071
    00077     PSVIElement( MemoryManager* const manager = XMLPlatformUtils::fgMemoryManager);
    00078
    00080
    00083     ~PSVIElement();
    00085
    00086     //---------------------
    00090
    00097     XSElementDeclaration *getElementDeclaration();
    00098
    00104     XSNotationDeclaration *getNotationDeclaration();
    00105
    00112     XSModel *getSchemaInformation();
    00113
    00119     XSTypeDefinition *getTypeDefinition();
    00120
    00130     XSSimpleTypeDefinition *getMemberTypeDefinition();
    00131
    00133
    00134     //----------------------------------
    00138     void reset
    00139     (
    00140         const VALIDITY_STATE            validityState
    00141         , const ASSESSMENT_TYPE         assessmentType
    00142         , const XMLCh* const            validationContext
    00143         , bool                          isSpecified
    00144         , XSElementDeclaration* const   elemDecl
    00145         , XSTypeDefinition* const       typeDef
    00146         , XSSimpleTypeDefinition* const memberType
    00147         , XSModel* const                schemaInfo
    00148         , const XMLCh* const            defaultValue
    00149         , const XMLCh* const            normalizedValue = 0
    00150         , XMLCh* const                  canonicalValue = 0
    00151         , XSNotationDeclaration* const  notationDecl = 0
    00152     );
    00153
    00155
    00156 private:
    00157
    00158     // -----------------------------------------------------------------------
    00159     //  Unimplemented constructors and operators
    00160     // -----------------------------------------------------------------------
    00161     PSVIElement(const PSVIElement&);
    00162     PSVIElement & operator=(const PSVIElement &);
    00163
    00164
    00165     // -----------------------------------------------------------------------
    00166     //  data members
    00167     // -----------------------------------------------------------------------
    00168     // fElementDecl
    00169     //  element declaration component that validated this element
    00170     // fNotationDecl
    00171     //  (optional) notation decl associated with this element
    00172     // fSchemaInfo
    00173     //  Schema Information Item with which this validation episode is associated
    00174     XSElementDeclaration *fElementDecl;
    00175     XSNotationDeclaration *fNotationDecl;
    00176     XSModel *fSchemaInfo;
    00177 };
    00178
    00179 inline XSElementDeclaration *PSVIElement::getElementDeclaration()
    00180 {
    00181     return fElementDecl;
    00182 }
    00183
    00184 inline XSNotationDeclaration* PSVIElement::getNotationDeclaration()
    00185 {
    00186     return fNotationDecl;
    00187 }
    00188
    00189 inline XSModel* PSVIElement::getSchemaInformation()
    00190 {
    00191     return fSchemaInfo;
    00192 }
    00193
    00194 XERCES_CPP_NAMESPACE_END
    00195
    00196 #endif

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