source: NonGTP/Xerces/xerces-c_2_8_0/include/xercesc/framework/psvi/PSVIHandler.hpp @ 2674

Revision 2674, 5.2 KB checked in by mattausch, 16 years ago (diff)
Line 
1/*
2 * Licensed to the Apache Software Foundation (ASF) under one or more
3 * contributor license agreements.  See the NOTICE file distributed with
4 * this work for additional information regarding copyright ownership.
5 * The ASF licenses this file to You under the Apache License, Version 2.0
6 * (the "License"); you may not use this file except in compliance with
7 * the License.  You may obtain a copy of the License at
8 *
9 *      http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18 /*
19 * $Id: PSVIHandler.hpp 568078 2007-08-21 11:43:25Z amassari $
20 */
21
22
23#if !defined(PSVIHANDLER_HPP)
24#define PSVIHANDLER_HPP
25
26#include <xercesc/framework/psvi/PSVIElement.hpp>
27#include <xercesc/framework/psvi/PSVIAttributeList.hpp>
28
29XERCES_CPP_NAMESPACE_BEGIN
30
31
32/**
33  * This abstract class provides the interface for the scanner to return
34  * PSVI information to the application.
35  *
36  */
37class XMLPARSER_EXPORT PSVIHandler
38{
39public:
40    // -----------------------------------------------------------------------
41    //  Constructors are hidden, just the virtual destructor is exposed
42    // -----------------------------------------------------------------------
43    /** @name Destructor */
44    //@{
45    virtual ~PSVIHandler()
46    {
47    }
48    //@}
49
50    /** @name The PSVI handler interface */
51    //@{
52    /** Receive notification of the PSVI properties of an element.
53      * The scanner will issue this call after the XMLDocumentHandler
54      * endElement call.  Since the scanner will issue the psviAttributes
55      * call immediately after reading the start tag of an element, all element
56      * content will be effectively bracketed by these two calls.
57      * @param  localName The name of the element whose end tag was just
58      *                     parsed.
59      * @param  uri       The namespace to which the element is bound
60      * @param  elementInfo    Object containing the element's PSVI properties
61      */
62    virtual void handleElementPSVI
63    (
64        const   XMLCh* const            localName
65        , const XMLCh* const            uri
66        ,       PSVIElement *           elementInfo
67    ) = 0;
68
69    /**
70      * Receive notification of partial PSVI properties of an element.
71      * This callback is made right after the psviAttributes
72      * call for non-empty element.
73      *
74      *  The PSVIElement passed in has all fields properly set and it
75      *  can be safely accessed the same way as the one passed in handleElementPSVI.
76      *  However, fields listed below always have default values.
77      *
78      *  getValidity()                PSVIItem::VALIDITY_NOTKNOWN
79      *  getValidationAttemped()      PSVIItem::VALIDATION_NONE
80      *  getMemberTypeDefinition()    0
81      *  getSchemaNormalizedValue()   0
82      *  getCanonicalRepresentation() 0
83      *  getNotationDeclaration()     0
84      *
85      *
86      * @param  localName    The name of the element upon which start tag
87      *                      these attributes were encountered.
88      * @param  uri          The namespace to which the element is bound
89      * @param  elementInfo  Object containing the element's partial PSVI properties
90      */
91    virtual void handlePartialElementPSVI
92    (
93          const XMLCh*        const localName
94        , const XMLCh*        const uri
95        ,       PSVIElement *       elementInfo
96    );
97
98    /**
99      * Enables PSVI information about attributes to be passed back to the
100      * application.  This callback will be made on *all*
101      * elements; on elements with no attributes, the final parameter will
102      * be null.
103      * @param  localName The name of the element upon which start tag
104      *          these attributes were encountered.
105      * @param  uri       The namespace to which the element is bound
106      * @param  psviAttributes   Object containing the attributes' PSVI properties
107      *          with information to identify them.
108      */
109    virtual void handleAttributesPSVI
110    (
111        const   XMLCh* const            localName
112        , const XMLCh* const            uri
113        ,       PSVIAttributeList *     psviAttributes
114    ) = 0;
115
116
117    //@}
118
119
120
121protected :
122    // -----------------------------------------------------------------------
123    //  Hidden Constructors
124    // -----------------------------------------------------------------------
125    PSVIHandler()
126    {
127    }
128
129
130private:
131    // -----------------------------------------------------------------------
132    //  Unimplemented constructors and operators
133    // -----------------------------------------------------------------------
134    PSVIHandler(const PSVIHandler&);
135    PSVIHandler& operator=(const PSVIHandler&);
136};
137
138inline void PSVIHandler::handlePartialElementPSVI(const XMLCh*        const /*localName*/
139                                                , const XMLCh*        const /*uri*/
140                                                ,       PSVIElement *       /*elementInfo*/
141                                                 )
142{
143}
144
145XERCES_CPP_NAMESPACE_END
146
147#endif
Note: See TracBrowser for help on using the repository browser.