|
1 /* |
|
2 * THIS FILE IS AUTOMATICALLY GENERATED, DO NOT EDIT. |
|
3 * |
|
4 * |
|
5 * Copyright (C) 2005 Apple Computer, Inc. All rights reserved. |
|
6 * |
|
7 * Redistribution and use in source and binary forms, with or without |
|
8 * modification, are permitted provided that the following conditions |
|
9 * are met: |
|
10 * 1. Redistributions of source code must retain the above copyright |
|
11 * notice, this list of conditions and the following disclaimer. |
|
12 * 2. Redistributions in binary form must reproduce the above copyright |
|
13 * notice, this list of conditions and the following disclaimer in the |
|
14 * documentation and/or other materials provided with the distribution. |
|
15 * |
|
16 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY |
|
17 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
|
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
|
19 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR |
|
20 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
|
21 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
|
22 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
|
23 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
|
24 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
|
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
|
26 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
|
27 */ |
|
28 |
|
29 |
|
30 #include "config.h" |
|
31 #ifdef AVOID_STATIC_CONSTRUCTORS |
|
32 #define DOM_XMLNAMES_HIDE_GLOBALS 1 |
|
33 #else |
|
34 #define QNAME_DEFAULT_CONSTRUCTOR 1 |
|
35 #endif |
|
36 |
|
37 #include "XMLNames.h" |
|
38 |
|
39 #include "StaticConstructors.h" |
|
40 namespace WebCore { namespace XMLNames { |
|
41 |
|
42 using namespace WebCore; |
|
43 |
|
44 DEFINE_GLOBAL(AtomicString, xmlNamespaceURI, "http://www.w3.org/XML/1998/namespace") |
|
45 |
|
46 // Attributes |
|
47 DEFINE_GLOBAL(QualifiedName, baseAttr, nullAtom, "base", xmlNamespaceURI); |
|
48 DEFINE_GLOBAL(QualifiedName, langAttr, nullAtom, "lang", xmlNamespaceURI); |
|
49 DEFINE_GLOBAL(QualifiedName, spaceAttr, nullAtom, "space", xmlNamespaceURI); |
|
50 |
|
51 |
|
52 WebCore::QualifiedName** getXMLAttrs(size_t* size) |
|
53 { |
|
54 static WebCore::QualifiedName* XMLAttr[] = { |
|
55 (WebCore::QualifiedName*)&baseAttr, |
|
56 (WebCore::QualifiedName*)&langAttr, |
|
57 (WebCore::QualifiedName*)&spaceAttr, |
|
58 }; |
|
59 *size = 3; |
|
60 return XMLAttr; |
|
61 } |
|
62 |
|
63 void init() |
|
64 { |
|
65 static bool initialized = false; |
|
66 if (initialized) |
|
67 return; |
|
68 initialized = true; |
|
69 |
|
70 // Use placement new to initialize the globals. |
|
71 |
|
72 AtomicString::init(); |
|
73 AtomicString xmlNS("http://www.w3.org/XML/1998/namespace"); |
|
74 |
|
75 // Namespace |
|
76 new ((void*)&xmlNamespaceURI) AtomicString(xmlNS); |
|
77 |
|
78 // Attributes |
|
79 const char *baseAttrString = "base"; |
|
80 const char *langAttrString = "lang"; |
|
81 const char *spaceAttrString = "space"; |
|
82 |
|
83 new ((void*)&baseAttr) QualifiedName(nullAtom, baseAttrString, xmlNS); |
|
84 new ((void*)&langAttr) QualifiedName(nullAtom, langAttrString, xmlNS); |
|
85 new ((void*)&spaceAttr) QualifiedName(nullAtom, spaceAttrString, xmlNS); |
|
86 } |
|
87 |
|
88 } } |
|
89 |