source: icXML/icXML-devel/src/xercesc/util/XMLInitializer.cpp @ 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: 3.3 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.cpp 635560 2008-03-10 14:10:09Z borisk $
20 */
21
22
23// ---------------------------------------------------------------------------
24//  Includes
25// ---------------------------------------------------------------------------
26#include <xercesc/util/XMLInitializer.hpp>
27#include <icxercesc/util/PlatformUtils.hpp>
28
29XERCES_CPP_NAMESPACE_BEGIN
30
31// ---------------------------------------------------------------------------
32//  XMLInitializer: Initialization methods
33// ---------------------------------------------------------------------------
34void XMLInitializer::initializeStaticData()
35{
36    try
37    {
38        // Note that in some cases the order of initialization can be
39        // important.
40        //
41
42        // Core
43        //
44        initializeEncodingValidator();
45        initializeXMLException();
46        initializeXMLScanner();
47        initializeXMLValidator();
48
49        // Regex
50        //
51        initializeRangeTokenMap();
52        initializeRegularExpression();
53
54        // DTD
55        //
56        initializeDTDGrammar();
57
58        // Schema
59        //
60        initializeXSDErrorReporter();
61        initializeDatatypeValidatorFactory();
62        initializeGeneralAttributeCheck();
63        initializeXSValue();
64        initializeComplexTypeInfo();
65
66        // DOM
67        //
68        initializeDOMImplementationRegistry();
69        initializeDOMImplementationImpl();
70        initializeDOMDocumentTypeImpl();
71        initializeDOMNodeListImpl();
72        initializeDOMNormalizer();
73    }
74    catch(...) {
75        XMLPlatformUtils::panic(PanicHandler::Panic_AllStaticInitErr);
76    }
77}
78
79
80void XMLInitializer::terminateStaticData()
81{
82    // Terminate in the reverse order of initialization. There shouldn't
83    // be any exceptions and if there are, we can't do anything about them
84    // since we are no longer initialized (think of it as throwing from
85    // a destructor).
86    //
87
88    // DOM
89    //
90    terminateDOMNormalizer();
91    terminateDOMNodeListImpl();
92    terminateDOMDocumentTypeImpl();
93    terminateDOMImplementationImpl();
94    terminateDOMImplementationRegistry();
95
96    // Schema
97    //
98    terminateComplexTypeInfo();
99    terminateXSValue();
100    terminateGeneralAttributeCheck();
101    terminateDatatypeValidatorFactory();
102    terminateXSDErrorReporter();
103
104    // DTD
105    //
106    terminateDTDGrammar();
107
108    // Regex
109    //
110    terminateRegularExpression();
111    terminateRangeTokenMap();
112
113    // Core
114    //
115    terminateXMLValidator();
116    terminateXMLScanner();
117    terminateXMLException();
118    terminateEncodingValidator();
119}
120
121
122XERCES_CPP_NAMESPACE_END
Note: See TracBrowser for help on using the repository browser.