45#ifndef BLOCXX_ARRAY_IMPL_HPP_INCLUDE_GUARD_
46#define BLOCXX_ARRAY_IMPL_HPP_INCLUDE_GUARD_
47#include "blocxx/BLOCXX_config.h"
96template<
class InputIterator>
169 return m_impl->max_size();
176 return m_impl->capacity();
190#ifdef BLOCXX_CHECK_ARRAY_INDEXING
200#ifdef BLOCXX_CHECK_ARRAY_INDEXING
288#ifdef BLOCXX_CHECK_ARRAY_INDEXING
298#ifdef BLOCXX_CHECK_ARRAY_INDEXING
306template<
class InputIterator>
317 insert(end(),
x.begin(),
x.end());
380 return find(
x, begin(), end());
401 return find(
x, begin(), end());
415 return find(
x, begin(), end()) != end();
418#ifdef BLOCXX_CHECK_ARRAY_INDEXING
436 return *
x.m_impl == *
y.m_impl;
441 return *
x.m_impl < *
y.m_impl;
Array<> wraps std::vector<> in COWReference<> adding ref counting and copy on write capability.
void append(const T &x)
Append an element to the end of the Array.
reverse_iterator rbegin()
void remove(size_type index)
Remove an element from the Array at a given index.
void push_back(const T &x)
Append an element to the end of the Array.
void appendArray(const Array< T > &x)
Append the elements of another Array to the end of this Array.
iterator erase(iterator position)
Remove an element of the Array specified with an iterator.
size_type max_size() const
V::const_reverse_iterator const_reverse_iterator
friend bool operator==(const Array< T > &x, const Array< T > &y)
Determine equality of two Arrays.
V::const_iterator const_iterator
bool contains(const T &x, const_iterator first, const_iterator last) const
Determine if element x is contained in the array range specified by the first and last iterators.
V::const_reference const_reference
void clear()
Remove all items from the Array.
Array()
Default Constructor.
iterator insert(iterator position, const T &x)
Insert an element in the Array before an element specified by an iterator.
void resize(size_type new_size, const T &x)
Ensure the Array is a given size.
Array< T > & operator+=(const T &x)
Append an object to the end of the Array.
void swap(Array< T > &x)
Swap the elements of this Array with the elements of another.
void reserve(size_type n)
Ensure the capacity is at least the size of a given value.
std::vector< T, std::allocator< T > > V
const_iterator find(const T &x, const_iterator first, const_iterator last) const
Find element x in the array range specified by the first and last iterators.
size_type capacity() const
V::reverse_iterator reverse_iterator
reference operator[](size_type n)
Retrieve A read/write reference to an object in the Array at a given index.
void pop_back()
Remove the last element of the Array.
void swap(IntrusiveReference &rhs)
bool operator<(const Array< T > &x, const Array< T > &y)
bool operator==(const Array< T > &x, const Array< T > &y)
void swap(Array< T > &x, Array< T > &y)