/*
 * THIS FILE WAS AUTOMATICALLY GENERATED, DO NOT EDIT.
 *
 * This file was generated by the dom/make_names.pl script.
 *
 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2013 Apple Inc.  All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

#include "config.h"

#ifdef SKIP_STATIC_CONSTRUCTORS_ON_GCC
#define DOM_XMLNS_NAMES_HIDE_GLOBALS 1
#else
#define QNAME_DEFAULT_CONSTRUCTOR 1
#endif

#include "XMLNSNames.h"

namespace WebCore {

namespace XMLNSNames {

using namespace WebCore;

MainThreadLazyNeverDestroyed<const AtomString> xmlnsNamespaceURI;

#if COMPILER(MSVC)
#pragma warning(push)
#pragma warning(disable: 4307)
#endif

static constexpr StringImpl::StaticStringImpl xmlnsData("xmlns");

#if COMPILER(MSVC)
#pragma warning(pop)
#endif


// Attributes
WEBCORE_EXPORT LazyNeverDestroyed<const QualifiedName> xmlnsAttr;


const WebCore::QualifiedName* const* getXMLNSAttrs()
{
    static const WebCore::QualifiedName* const XMLNSAttrs[] = {
        &xmlnsAttr.get(),
    };
    return XMLNSAttrs;
}

void init()
{
    static bool initialized = false;
    if (initialized)
        return;
    initialized = true;

    // Use placement new to initialize the globals.
    AtomString xmlnsNS("http://www.w3.org/2000/xmlns/"_s);

    // Namespace
    xmlnsNamespaceURI.construct(xmlnsNS);

#ifndef NDEBUG
    reinterpret_cast<const StringImpl*>(&xmlnsData)->assertHashIsCorrect();
#endif // NDEBUG


    struct AttributesTableEntry {
        LazyNeverDestroyed<const QualifiedName>* targetAddress;
        const StaticStringImpl& name;
    };

    static const AttributesTableEntry attributesTable[] = {
        { &xmlnsAttr, *(&xmlnsData) },
    };

    for (auto& entry : attributesTable)
        entry.targetAddress->construct(nullAtom(), AtomString(&entry.name), xmlnsNS);
}

} }

