source: icXML/icXML-devel/src/xercesc/framework/psvi/PSVIHandler.hpp @ 2722

Last change on this file since 2722 was 2722, checked in by cameron, 6 years ago

Original Xerces files with import mods for icxercesc

File size: 5.2 KB
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 676796 2008-07-15 05:04:13Z dbertoni $
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_PSVIHANDLER_HPP)
23#define XERCESC_INCLUDE_GUARD_PSVIHANDLER_HPP
24
25
26XERCES_CPP_NAMESPACE_BEGIN
27
28
29class PSVIElement;
30class PSVIAttributeList;
31
32
33/**
34  * This abstract class provides the interface for the scanner to return
35  * PSVI information to the application.
36  *
37  */
38class XMLPARSER_EXPORT PSVIHandler
39{
40public:
41    // -----------------------------------------------------------------------
42    //  Constructors are hidden, just the virtual destructor is exposed
43    // -----------------------------------------------------------------------
44    /** @name Destructor */
45    //@{
46    virtual ~PSVIHandler()
47    {
48    }
49    //@}
50
51    /** @name The PSVI handler interface */
52    //@{
53    /** Receive notification of the PSVI properties of an element.
54      * The scanner will issue this call after the XMLDocumentHandler
55      * endElement call.  Since the scanner will issue the psviAttributes
56      * call immediately after reading the start tag of an element, all element
57      * content will be effectively bracketed by these two calls.
58      * @param  localName The name of the element whose end tag was just
59      *                     parsed.
60      * @param  uri       The namespace to which the element is bound
61      * @param  elementInfo    Object containing the element's PSVI properties
62      */
63    virtual void handleElementPSVI
64    (
65        const   XMLCh* const            localName
66        , const XMLCh* const            uri
67        ,       PSVIElement *           elementInfo
68    ) = 0;
69
70    /**
71      * Receive notification of partial PSVI properties of an element.
72      * This callback is made right after the psviAttributes
73      * call for non-empty element.
74      *
75      *  The PSVIElement passed in has all fields properly set and it
76      *  can be safely accessed the same way as the one passed in handleElementPSVI.
77      *  However, fields listed below always have default values.
78      *
79      *  getValidity()                PSVIItem::VALIDITY_NOTKNOWN
80      *  getValidationAttemped()      PSVIItem::VALIDATION_NONE
81      *  getMemberTypeDefinition()    0
82      *  getSchemaNormalizedValue()   0
83      *  getCanonicalRepresentation() 0
84      *  getNotationDeclaration()     0
85      *
86      *
87      * @param  localName    The name of the element upon which start tag
88      *                      these attributes were encountered.
89      * @param  uri          The namespace to which the element is bound
90      * @param  elementInfo  Object containing the element's partial PSVI properties
91      */
92    virtual void handlePartialElementPSVI
93    (
94          const XMLCh*        const localName
95        , const XMLCh*        const uri
96        ,       PSVIElement *       elementInfo
97    );
98
99    /**
100      * Enables PSVI information about attributes to be passed back to the
101      * application.  This callback will be made on *all*
102      * elements; on elements with no attributes, the final parameter will
103      * be null.
104      * @param  localName The name of the element upon which start tag
105      *          these attributes were encountered.
106      * @param  uri       The namespace to which the element is bound
107      * @param  psviAttributes   Object containing the attributes' PSVI properties
108      *          with information to identify them.
109      */
110    virtual void handleAttributesPSVI
111    (
112        const   XMLCh* const            localName
113        , const XMLCh* const            uri
114        ,       PSVIAttributeList *     psviAttributes
115    ) = 0;
116
117
118    //@}
119
120
121
122protected :
123    // -----------------------------------------------------------------------
124    //  Hidden Constructors
125    // -----------------------------------------------------------------------
126    PSVIHandler()
127    {
128    }
129
130
131private:
132    // -----------------------------------------------------------------------
133    //  Unimplemented constructors and operators
134    // -----------------------------------------------------------------------
135    PSVIHandler(const PSVIHandler&);
136    PSVIHandler& operator=(const PSVIHandler&);
137};
138
139inline void PSVIHandler::handlePartialElementPSVI(const XMLCh*        const /*localName*/
140                                                , const XMLCh*        const /*uri*/
141                                                ,       PSVIElement *       /*elementInfo*/
142                                                 )
143{
144}
145
146XERCES_CPP_NAMESPACE_END
147
148#endif
Note: See TracBrowser for help on using the repository browser.