Public Types | Public Member Functions | Protected Member Functions | List of all members
ustl::vector< T > Class Template Reference

STL vector equivalent. More...

#include <ustl.h>

Inheritance diagram for ustl::vector< T >:
ustl::list< T > ustl::multiset< T, Comp > ustl::set< T, Comp >

Public Types

typedef T value_type
 
typedef value_type * pointer
 
typedef const value_type * const_pointer
 
typedef value_type & reference
 
typedef const value_type & const_reference
 
typedef pointer iterator
 
typedef const_pointer const_iterator
 
typedef memblock::size_type size_type
 
typedef memblock::written_size_type written_size_type
 
typedef memblock::difference_type difference_type
 
typedef ::ustl::reverse_iterator< iterator > reverse_iterator
 
typedef ::ustl::reverse_iterator< const_iterator > const_reverse_iterator
 

Public Member Functions

 vector (void)
 Initializes empty vector.
 
 vector (size_type n)
 Initializes a vector of size n.
 
 vector (size_type n, const T &v)
 Copies n elements from v.
 
 vector (const vector &v)
 Copies v.
 
 vector (const_iterator i1, const_iterator i2)
 Copies range [i1, i2].
 
 ~vector (void) noexcept
 Destructor.
 
const vectoroperator= (const vector &v)
 Copies contents of v.
 
bool operator== (const vector &v) const
 
 operator cmemlink (void) const
 
 operator cmemlink (void)
 
 operator memlink (void)
 
void reserve (size_type n, bool bExact=false)
 Allocates space for at least n elements.
 
void resize (size_type n, bool bExact=true)
 Resizes the vector to contain n elements.
 
size_type capacity (void) const
 
size_type size (void) const
 
size_type max_size (void) const
 
bool empty (void) const
 
iterator begin (void)
 
const_iterator begin (void) const
 
iterator end (void)
 
const_iterator end (void) const
 
const_iterator cbegin (void) const
 
const_iterator cend (void) const
 
reverse_iterator rbegin (void)
 
const_reverse_iterator rbegin (void) const
 
reverse_iterator rend (void)
 
const_reverse_iterator rend (void) const
 
const_reverse_iterator crbegin (void) const
 
const_reverse_iterator crend (void) const
 
iterator data (void)
 
const_iterator data (void) const
 
const_iterator cdata (void) const
 
iterator iat (size_type i)
 
const_iterator iat (size_type i) const
 
reference at (size_type i)
 
const_reference at (size_type i) const
 
reference operator[] (size_type i)
 
const_reference operator[] (size_type i) const
 
reference front (void)
 
const_reference front (void) const
 
reference back (void)
 
const_reference back (void) const
 
void push_back (const T &v=T())
 Inserts value v at the end of the vector.
 
void pop_back (void)
 
void clear (void)
 
void shrink_to_fit (void)
 
void deallocate (void) noexcept
 Calls element destructors and frees storage.
 
void assign (const_iterator i1, const_iterator i2)
 Copies the range [i1, i2].
 
void assign (size_type n, const T &v)
 Copies n elements with value v.
 
void swap (vector &v)
 
iterator insert (const_iterator ip, const T &v)
 Inserts value v at offset ip.
 
iterator insert (const_iterator ip, size_type n, const T &v)
 Inserts n elements with value v at offsets ip.
 
iterator insert (const_iterator ip, const_iterator i1, const_iterator i2)
 Inserts range [i1, i2] at offset ip.
 
iterator erase (const_iterator ep, size_type n=1)
 Removes count elements at offset ep.
 
iterator erase (const_iterator ep1, const_iterator ep2)
 Removes elements from ep1 to ep2.
 
void manage (pointer p, size_type n)
 
bool is_linked (void) const
 
void unlink (void)
 
void copy_link (void)
 
void link (const_pointer p, size_type n)
 
void link (pointer p, size_type n)
 
void link (const vector &v)
 
void link (vector &v)
 
void link (const_pointer first, const_pointer last)
 
void link (pointer first, pointer last)
 
void read (istream &is)
 
void write (ostream &os) const
 
void text_write (ostringstream &os) const
 
size_t stream_size (void) const
 
 vector (vector &&v)
 
 vector (std::initializer_list< T > v)
 
vectoroperator= (vector &&v)
 
template<typename... Args>
iterator emplace (const_iterator ip, Args &&...args)
 Constructs value at ip.
 
template<typename... Args>
void emplace_back (Args &&...args)
 Constructs value at the end of the vector.
 
void push_back (T &&v)
 
iterator insert (const_iterator ip, T &&v)
 
iterator insert (const_iterator ip, std::initializer_list< T > v)
 

Protected Member Functions

iterator insert_space (const_iterator ip, size_type n)
 Inserts n uninitialized elements at ip.
 

Detailed Description

template<typename T>
class ustl::vector< T >

STL vector equivalent.

Provides a typed array-like interface to a managed memory block, including element access, iteration, modification, resizing, and serialization. In this design elements frequently undergo bitwise move, so don't put it in here if it doesn't support it. This mostly means having no self-pointers.


The documentation for this class was generated from the following file:

Generated on Mon Sep 28 2015 17:58:50 for uSTL by Doxygen 1.8.10