Back to home page

EIC code displayed by LXR

 
 

    


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

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_PSVIHANDLER_HPP)
0023 #define XERCESC_INCLUDE_GUARD_PSVIHANDLER_HPP
0024 
0025 
0026 XERCES_CPP_NAMESPACE_BEGIN
0027 
0028 
0029 class PSVIElement;
0030 class PSVIAttributeList;
0031 
0032 
0033 /**
0034   * This abstract class provides the interface for the scanner to return
0035   * PSVI information to the application.
0036   *
0037   */
0038 class XMLPARSER_EXPORT PSVIHandler
0039 {
0040 public:
0041     // -----------------------------------------------------------------------
0042     //  Constructors are hidden, just the virtual destructor is exposed
0043     // -----------------------------------------------------------------------
0044     /** @name Destructor */
0045     //@{
0046     virtual ~PSVIHandler()
0047     {
0048     }
0049     //@}
0050 
0051     /** @name The PSVI handler interface */
0052     //@{
0053     /** Receive notification of the PSVI properties of an element.
0054       * The scanner will issue this call after the XMLDocumentHandler
0055       * endElement call.  Since the scanner will issue the psviAttributes
0056       * call immediately after reading the start tag of an element, all element
0057       * content will be effectively bracketed by these two calls.
0058       * @param  localName The name of the element whose end tag was just
0059       *                     parsed.
0060       * @param  uri       The namespace to which the element is bound
0061       * @param  elementInfo    Object containing the element's PSVI properties
0062       */
0063     virtual void handleElementPSVI
0064     (
0065         const   XMLCh* const            localName 
0066         , const XMLCh* const            uri
0067         ,       PSVIElement *           elementInfo
0068     ) = 0;
0069 
0070     /** 
0071       * Receive notification of partial PSVI properties of an element.
0072       * This callback is made right after the psviAttributes
0073       * call for non-empty element. 
0074       *
0075       *  The PSVIElement passed in has all fields properly set and it
0076       *  can be safely accessed the same way as the one passed in handleElementPSVI.
0077       *  However, fields listed below always have default values.
0078       *
0079       *  getValidity()                PSVIItem::VALIDITY_NOTKNOWN
0080       *  getValidationAttemped()      PSVIItem::VALIDATION_NONE
0081       *  getMemberTypeDefinition()    0
0082       *  getSchemaNormalizedValue()   0
0083       *  getCanonicalRepresentation() 0
0084       *  getNotationDeclaration()     0
0085       *
0086       *
0087       * @param  localName    The name of the element upon which start tag 
0088       *                      these attributes were encountered.
0089       * @param  uri          The namespace to which the element is bound
0090       * @param  elementInfo  Object containing the element's partial PSVI properties
0091       */
0092     virtual void handlePartialElementPSVI
0093     (
0094           const XMLCh*        const localName 
0095         , const XMLCh*        const uri
0096         ,       PSVIElement *       elementInfo
0097     );
0098 
0099     /**
0100       * Enables PSVI information about attributes to be passed back to the
0101       * application.  This callback will be made on *all*
0102       * elements; on elements with no attributes, the final parameter will
0103       * be null.
0104       * @param  localName The name of the element upon which start tag 
0105       *          these attributes were encountered.
0106       * @param  uri       The namespace to which the element is bound
0107       * @param  psviAttributes   Object containing the attributes' PSVI properties
0108       *          with information to identify them.
0109       */
0110     virtual void handleAttributesPSVI
0111     (
0112         const   XMLCh* const            localName 
0113         , const XMLCh* const            uri
0114         ,       PSVIAttributeList *     psviAttributes
0115     ) = 0;
0116 
0117 
0118     //@}
0119 
0120 
0121 
0122 protected :
0123     // -----------------------------------------------------------------------
0124     //  Hidden Constructors
0125     // -----------------------------------------------------------------------
0126     PSVIHandler()
0127     {
0128     }
0129 
0130 
0131 private:
0132     // -----------------------------------------------------------------------
0133     //  Unimplemented constructors and operators
0134     // -----------------------------------------------------------------------
0135     PSVIHandler(const PSVIHandler&);
0136     PSVIHandler& operator=(const PSVIHandler&);
0137 };
0138 
0139 inline void PSVIHandler::handlePartialElementPSVI(const XMLCh*        const /*localName*/
0140                                                 , const XMLCh*        const /*uri*/
0141                                                 ,       PSVIElement *       /*elementInfo*/
0142                                                  )
0143 {
0144 }
0145 
0146 XERCES_CPP_NAMESPACE_END
0147 
0148 #endif