mirror of
https://github.com/klzgrad/naiveproxy.git
synced 2024-11-28 16:26:10 +03:00
60 lines
2.2 KiB
C++
60 lines
2.2 KiB
C++
// Copyright (c) 2017 The Chromium Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
#ifndef NET_QUIC_PLATFORM_API_QUIC_CONTAINERS_H_
|
|
#define NET_QUIC_PLATFORM_API_QUIC_CONTAINERS_H_
|
|
|
|
#include "net/quic/platform/impl/quic_containers_impl.h"
|
|
|
|
namespace net {
|
|
|
|
// A general-purpose unordered map.
|
|
template <typename Key,
|
|
typename Value,
|
|
typename Hash = typename QuicUnorderedMapImpl<Key, Value>::hasher,
|
|
typename Eq = typename QuicUnorderedMapImpl<Key, Value>::key_equal,
|
|
typename Alloc =
|
|
typename QuicUnorderedMapImpl<Key, Value>::allocator_type>
|
|
using QuicUnorderedMap = QuicUnorderedMapImpl<Key, Value, Hash, Eq, Alloc>;
|
|
|
|
// A general-purpose unordered set.
|
|
template <typename Key,
|
|
typename Hash = typename QuicUnorderedSetImpl<Key>::hasher,
|
|
typename Eq = typename QuicUnorderedSetImpl<Key>::key_equal,
|
|
typename Alloc = typename QuicUnorderedSetImpl<Key>::allocator_type>
|
|
using QuicUnorderedSet = QuicUnorderedSetImpl<Key, Hash, Eq, Alloc>;
|
|
|
|
// A map which offers insertion-ordered iteration.
|
|
template <typename Key, typename Value>
|
|
using QuicLinkedHashMap = QuicLinkedHashMapImpl<Key, Value>;
|
|
|
|
// Used for maps that are typically small, then it is faster than (for example)
|
|
// hash_map which is optimized for large data sets. QuicSmallMap upgrades itself
|
|
// automatically to a QuicSmallMapImpl-specified map when it runs out of space.
|
|
template <typename Key, typename Value, int Size>
|
|
using QuicSmallMap = QuicSmallMapImpl<Key, Value, Size>;
|
|
|
|
// A data structure used to represent a sorted set of non-empty, non-adjacent,
|
|
// and mutually disjoint intervals.
|
|
template <typename T>
|
|
using QuicIntervalSet = QuicIntervalSetImpl<T>;
|
|
|
|
// Represents a simple queue which may be backed by a list or
|
|
// a flat circular buffer.
|
|
//
|
|
// DOES NOT GUARANTEE POINTER OR ITERATOR STABILITY!
|
|
template <typename T>
|
|
using QuicQueue = QuicQueueImpl<T>;
|
|
|
|
// Represents a double-ended queue which may be backed by a list or
|
|
// a flat circular buffer.
|
|
//
|
|
// DOES NOT GUARANTEE POINTER OR ITERATOR STABILITY!
|
|
template <typename T>
|
|
using QuicDeque = QuicDequeImpl<T>;
|
|
|
|
} // namespace net
|
|
|
|
#endif // NET_QUIC_PLATFORM_API_QUIC_CONTAINERS_H_
|