chromium/third_party/blink/renderer/platform/wtf/hash_counted_set.h

/*
 * Copyright (C) 2005, 2006, 2008 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_PLATFORM_WTF_HASH_COUNTED_SET_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_HASH_COUNTED_SET_H_

#include "base/check_op.h"
#include "third_party/blink/renderer/platform/wtf/allocator/partition_allocator.h"
#include "third_party/blink/renderer/platform/wtf/hash_map.h"
#include "third_party/blink/renderer/platform/wtf/type_traits.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"

namespace WTF {

// An unordered hash set that keeps track of how many times you added an item to
// the set. The iterators have fields ->key and ->value that return the set
// members and their counts, respectively.
template <typename Value,
          typename Traits = HashTraits<Value>,
          typename Allocator = PartitionAllocator>
class HashCountedSet {};

template <typename T, typename U, typename V>
inline typename HashCountedSet<T, U, V>::AddResult
HashCountedSet<T, U, V>::insert(const ValueType& value, unsigned count) {}

template <typename T, typename U, typename V>
inline typename HashCountedSet<T, U, V>::AddResult
HashCountedSet<T, U, V>::insert(const ValueType& value) {}

template <typename T, typename U, typename V>
inline bool HashCountedSet<T, U, V>::erase(iterator it) {}

template <typename T, typename U, typename V>
inline void HashCountedSet<T, U, V>::RemoveAll(iterator it) {}

template <typename Value,
          typename Traits,
          typename Allocator,
          typename VectorType>
inline void CopyToVector(
    const HashCountedSet<Value, Traits, Allocator>& collection,
    VectorType& vector) {}

template <typename T, typename U, typename V>
inline Vector<T> HashCountedSet<T, U, V>::AsVector() const {}

}  // namespace WTF

HashCountedSet;

#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_HASH_COUNTED_SET_H_