source: icXML/icXML-devel/src/xercesc/util/XMLInitializer.hpp @ 2732

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

Original Xerces files with import mods for icxercesc

File size: 4.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: XMLInitializer.hpp 695427 2008-09-15 11:05:36Z borisk $
20 */
21
22#if !defined(XERCESC_INCLUDE_GUARD_XMLINITIALIZER_HPP)
23#define XERCESC_INCLUDE_GUARD_XMLINITIALIZER_HPP
24
25#include <xercesc/util/XercesDefs.hpp>
26
27XERCES_CPP_NAMESPACE_BEGIN
28
29
30/**
31  * Utilities that must be implemented in a class-specific way.
32  *
33  * This class contains methods that must be implemented by different
34  * classes that have static data (class or local) that they need
35  * to initialize when XMLPlatformUtils::Initialize is invoked.
36  */
37class XMLUTIL_EXPORT XMLInitializer
38{
39protected :
40    /** @name Initialization methods */
41    //@{
42
43    /** Perform per-class allocationa and initialization of static data
44      *
45      * These functions should be called from XMLPlatformUtils::Initialize.
46      */
47    static void initializeTransService();
48    static void initializeStaticData();
49
50    /** Perform per-class release of static data
51      *
52      * These functions should be called from XMLPlatformUtils::Terminate.
53      */
54    static void terminateStaticData();
55    static void terminateTransService();
56
57    //@}
58
59    friend class XMLPlatformUtils;
60
61private :
62    XMLInitializer();
63    XMLInitializer(const XMLInitializer& toCopy);
64    XMLInitializer& operator=(const XMLInitializer&);
65
66private:
67    // Note: The name of each function should be in the form
68    // initialize<class-name>.
69    //
70    // Note: In some cases order of initialization is important.
71    //
72
73    //
74    // Initialize
75    //
76
77    // Core
78    //
79    static void initializeEncodingValidator();
80    static void initializeXMLException();
81    static void initializeXMLScanner();
82    static void initializeXMLValidator();
83
84    // Regex
85    //
86    static void initializeRangeTokenMap();
87    static void initializeRegularExpression();
88
89    // DTD
90    //
91    static void initializeDTDGrammar();
92
93    // Schema
94    //
95    static void initializeXSDErrorReporter();
96    static void initializeDatatypeValidatorFactory();
97    static void initializeGeneralAttributeCheck();
98    static void initializeXSValue();
99    static void initializeComplexTypeInfo();
100
101    // DOM
102    //
103    static void initializeDOMImplementationRegistry();
104    static void initializeDOMImplementationImpl();
105    static void initializeDOMDocumentTypeImpl();
106    static void initializeDOMNodeListImpl();
107    static void initializeDOMNormalizer();
108
109
110    //
111    // Terminate
112    //
113
114    // Core
115    //
116    static void terminateEncodingValidator();
117    static void terminateXMLException();
118    static void terminateXMLScanner();
119    static void terminateXMLValidator();
120
121    // Regex
122    //
123    static void terminateRangeTokenMap();
124    static void terminateRegularExpression();
125
126    // DTD
127    //
128    static void terminateDTDGrammar();
129
130    // Schema
131    //
132    static void terminateXSDErrorReporter();
133    static void terminateDatatypeValidatorFactory();
134    static void terminateGeneralAttributeCheck();
135    static void terminateXSValue();
136    static void terminateComplexTypeInfo();
137
138    // DOM
139    //
140    static void terminateDOMImplementationRegistry();
141    static void terminateDOMImplementationImpl();
142    static void terminateDOMDocumentTypeImpl();
143    static void terminateDOMNodeListImpl();
144    static void terminateDOMNormalizer();
145
146    //
147    // Extra initialization.
148    //
149    static void initializeDOMHeap (XMLSize_t initialHeapAllocSize,
150                                   XMLSize_t maxHeapAllocSize,
151                                   XMLSize_t maxSubAllocationSize);
152};
153
154
155XERCES_CPP_NAMESPACE_END
156
157#endif
Note: See TracBrowser for help on using the repository browser.