chromium/third_party/blink/renderer/core/dom/qualified_name.h

/*
 * Copyright (C) 2005, 2006, 2009 Apple Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this library; see the file COPYING.LIB.  If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 *
 */

#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_DOM_QUALIFIED_NAME_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_DOM_QUALIFIED_NAME_H_

#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/hash_table_deleted_value_type.h"
#include "third_party/blink/renderer/platform/wtf/hash_traits.h"
#include "third_party/blink/renderer/platform/wtf/ref_counted.h"
#include "third_party/blink/renderer/platform/wtf/text/atomic_string.h"

namespace blink {

struct QualifiedNameComponents {};

// This struct is used to pass data between QualifiedName and the
// QNameTranslator.  For hashing and equality only the QualifiedNameComponents
// fields are used.
struct QualifiedNameData {};

CORE_EXPORT extern const class QualifiedName& g_any_name;
CORE_EXPORT extern const class QualifiedName& g_null_name;

class CORE_EXPORT QualifiedName {};

inline const QualifiedName& AnyQName() {}

inline bool operator==(const AtomicString& a, const QualifiedName& q) {}
inline bool operator!=(const AtomicString& a, const QualifiedName& q) {}
inline bool operator==(const QualifiedName& q, const AtomicString& a) {}
inline bool operator!=(const QualifiedName& q, const AtomicString& a) {}

inline unsigned HashComponents(const QualifiedNameComponents& buf) {}

CORE_EXPORT std::ostream& operator<<(std::ostream&, const QualifiedName&);

}  // namespace blink

WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS()

namespace WTF {

template <>
struct HashTraits<blink::QualifiedName::QualifiedNameImpl*>
    : GenericHashTraits<blink::QualifiedName::QualifiedNameImpl*> {};

template <>
struct HashTraits<blink::QualifiedName>
    : GenericHashTraits<blink::QualifiedName> {};

}  // namespace WTF

#endif  // THIRD_PARTY_BLINK_RENDERER_CORE_DOM_QUALIFIED_NAME_H_