chromium/cc/base/list_container_helper.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "cc/base/list_container_helper.h"

#include <stddef.h>

#include <algorithm>
#include <cstring>
#include <utility>
#include <vector>

#include "base/check_op.h"
#include "base/memory/aligned_memory.h"
#include "base/memory/raw_ptr_exclusion.h"

namespace {
const size_t kDefaultNumElementTypesToReserve =;
}  // namespace

namespace cc {

// CharAllocator
////////////////////////////////////////////////////
// This class deals only with char* and void*. It does allocation and passing
// out raw pointers, as well as memory deallocation when being destroyed.
class ListContainerHelper::CharAllocator {};

// PositionInCharAllocator
//////////////////////////////////////////////////////
ListContainerHelper::PositionInCharAllocator::PositionInCharAllocator(
    const ListContainerHelper::PositionInCharAllocator& other) = default;

ListContainerHelper::PositionInCharAllocator&
ListContainerHelper::PositionInCharAllocator::operator=(
    const ListContainerHelper::PositionInCharAllocator& other) = default;

ListContainerHelper::PositionInCharAllocator::PositionInCharAllocator(
    ListContainerHelper::CharAllocator* container,
    size_t vector_ind,
    char* item_iter)
    :{}

bool ListContainerHelper::PositionInCharAllocator::operator==(
    const ListContainerHelper::PositionInCharAllocator& other) const {}

bool ListContainerHelper::PositionInCharAllocator::operator!=(
    const ListContainerHelper::PositionInCharAllocator& other) const {}

ListContainerHelper::PositionInCharAllocator
ListContainerHelper::PositionInCharAllocator::Increment() {}

ListContainerHelper::PositionInCharAllocator
ListContainerHelper::PositionInCharAllocator::ReverseIncrement() {}

// ListContainerHelper
////////////////////////////////////////////
ListContainerHelper::ListContainerHelper(size_t alignment,
                                         size_t max_size_for_derived_class,
                                         size_t num_of_elements_to_reserve_for)
    :{}

ListContainerHelper::~ListContainerHelper() = default;

void ListContainerHelper::RemoveLast() {}

void ListContainerHelper::EraseAndInvalidateAllPointers(
    ListContainerHelper::Iterator* position) {}

void ListContainerHelper::InsertBeforeAndInvalidateAllPointers(
    ListContainerHelper::Iterator* position,
    size_t count) {}

ListContainerHelper::ConstReverseIterator ListContainerHelper::crbegin() const {}

ListContainerHelper::ConstReverseIterator ListContainerHelper::crend() const {}

ListContainerHelper::ReverseIterator ListContainerHelper::rbegin() {}

ListContainerHelper::ReverseIterator ListContainerHelper::rend() {}

ListContainerHelper::ConstIterator ListContainerHelper::cbegin() const {}

ListContainerHelper::ConstIterator ListContainerHelper::cend() const {}

ListContainerHelper::Iterator ListContainerHelper::begin() {}

ListContainerHelper::Iterator ListContainerHelper::end() {}

ListContainerHelper::ConstIterator ListContainerHelper::IteratorAt(
    size_t index) const {}

ListContainerHelper::Iterator ListContainerHelper::IteratorAt(size_t index) {}

void* ListContainerHelper::Allocate(size_t alignment,
                                    size_t size_of_actual_element_in_bytes) {}

size_t ListContainerHelper::size() const {}

bool ListContainerHelper::empty() const {}

size_t ListContainerHelper::MaxSizeForDerivedClass() const {}

size_t ListContainerHelper::GetCapacityInBytes() const {}

void ListContainerHelper::clear() {}

size_t ListContainerHelper::AvailableSizeWithoutAnotherAllocationForTesting()
    const {}

// ListContainerHelper::Iterator
/////////////////////////////////////////////////
ListContainerHelper::Iterator::Iterator(CharAllocator* container,
                                        size_t vector_ind,
                                        char* item_iter,
                                        size_t index)
    :{}

ListContainerHelper::Iterator::~Iterator() = default;

size_t ListContainerHelper::Iterator::index() const {}

// ListContainerHelper::ConstIterator
/////////////////////////////////////////////////
ListContainerHelper::ConstIterator::ConstIterator(
    const ListContainerHelper::Iterator& other)
    :{}

ListContainerHelper::ConstIterator::ConstIterator(CharAllocator* container,
                                                  size_t vector_ind,
                                                  char* item_iter,
                                                  size_t index)
    :{}

ListContainerHelper::ConstIterator::~ConstIterator() = default;

size_t ListContainerHelper::ConstIterator::index() const {}

// ListContainerHelper::ReverseIterator
/////////////////////////////////////////////////
ListContainerHelper::ReverseIterator::ReverseIterator(CharAllocator* container,
                                                      size_t vector_ind,
                                                      char* item_iter,
                                                      size_t index)
    :{}

ListContainerHelper::ReverseIterator::~ReverseIterator() = default;

size_t ListContainerHelper::ReverseIterator::index() const {}

// ListContainerHelper::ConstReverseIterator
/////////////////////////////////////////////////
ListContainerHelper::ConstReverseIterator::ConstReverseIterator(
    const ListContainerHelper::ReverseIterator& other)
    :{}

ListContainerHelper::ConstReverseIterator::ConstReverseIterator(
    CharAllocator* container,
    size_t vector_ind,
    char* item_iter,
    size_t index)
    :{}

ListContainerHelper::ConstReverseIterator::~ConstReverseIterator() = default;

size_t ListContainerHelper::ConstReverseIterator::index() const {}

}  // namespace cc