mCRL2
Loading...
Searching...
No Matches
atermpp::vector< T, Alloc, ThreadSafe > Class Template Reference

A vector class in which aterms can be stored. More...

#include <vector.h>

Inheritance diagram for atermpp::vector< T, Alloc, ThreadSafe >:

Public Types

typedef super::allocator_type allocator_type
 Standard typedefs.
 
typedef super::value_type value_type
 
typedef super::size_type size_type
 
typedef super::reference reference
 
typedef super::iterator iterator
 
typedef super::const_iterator const_iterator
 

Public Member Functions

 vector ()
 Default constructor.
 
 vector (const allocator_type &alloc)
 Constructor.
 
 vector (size_type n, const allocator_type &alloc=allocator_type())
 Constructor.
 
 vector (size_type n, const value_type &val, const allocator_type &alloc=allocator_type())
 
template<class InputIterator >
 vector (InputIterator first, InputIterator last, const allocator_type &alloc=allocator_type())
 Constructor.
 
 vector (const vector &x)
 Constructor.
 
 vector (const vector &x, const allocator_type &alloc)
 Constructor.
 
 vector (vector &&x)
 Constructor.
 
 vector (vector &&x, const allocator_type &alloc)
 Constructor.
 
 vector (std::initializer_list< value_type > il, const allocator_type &alloc=allocator_type())
 Constructor. To be done later....
 
vectoroperator= (const vector &x)=default
 Assignment operator.
 
vectoroperator= (vector &&x)=default
 Move assignment operator.
 
 ~vector ()
 Standard destructor.
 
void shrink_to_fit ()
 
void clear () noexcept
 
iterator insert (const_iterator pos, const T &value)
 
iterator insert (const_iterator pos, T &&value)
 
iterator insert (const_iterator pos, size_type count, const T &value)
 
template<class InputIt >
iterator insert (const_iterator pos, InputIt first, InputIt last)
 
iterator insert (const_iterator pos, std::initializer_list< T > ilist)
 
template<class... Args>
iterator emplace (const_iterator pos, Args &&... args)
 
iterator erase (const_iterator pos)
 
iterator erase (const_iterator first, const_iterator last)
 
void push_back (const T &value)
 
void push_back (T &&value)
 
template<class... Args>
reference emplace_back (Args &&... args)
 
void pop_back ()
 
void resize (size_type count)
 
void resize (size_type count, const value_type &value)
 
void swap (vector &other) noexcept
 
std::size_t size () const
 

Protected Types

typedef std::vector< detail::reference_aterm< T >, Alloc > super
 

Protected Attributes

detail::generic_aterm_container< std::vector< detail::reference_aterm< T >, Alloc > > container_wrapper
 

Detailed Description

template<class T, class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
class atermpp::vector< T, Alloc, ThreadSafe >

A vector class in which aterms can be stored.

Definition at line 33 of file vector.h.

Member Typedef Documentation

◆ allocator_type

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
typedef super::allocator_type atermpp::vector< T, Alloc, ThreadSafe >::allocator_type

Standard typedefs.

Definition at line 42 of file vector.h.

◆ const_iterator

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
typedef super::const_iterator atermpp::vector< T, Alloc, ThreadSafe >::const_iterator

Definition at line 47 of file vector.h.

◆ iterator

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
typedef super::iterator atermpp::vector< T, Alloc, ThreadSafe >::iterator

Definition at line 46 of file vector.h.

◆ reference

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
typedef super::reference atermpp::vector< T, Alloc, ThreadSafe >::reference

Definition at line 45 of file vector.h.

◆ size_type

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
typedef super::size_type atermpp::vector< T, Alloc, ThreadSafe >::size_type

Definition at line 44 of file vector.h.

◆ super

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
typedef std::vector< detail::reference_aterm<T>, Alloc > atermpp::vector< T, Alloc, ThreadSafe >::super
protected

Definition at line 36 of file vector.h.

◆ value_type

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
typedef super::value_type atermpp::vector< T, Alloc, ThreadSafe >::value_type

Definition at line 43 of file vector.h.

Constructor & Destructor Documentation

◆ vector() [1/10]

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
atermpp::vector< T, Alloc, ThreadSafe >::vector ( )
inline

Default constructor.

Definition at line 50 of file vector.h.

◆ vector() [2/10]

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
atermpp::vector< T, Alloc, ThreadSafe >::vector ( const allocator_type alloc)
inlineexplicit

Constructor.

Definition at line 56 of file vector.h.

◆ vector() [3/10]

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
atermpp::vector< T, Alloc, ThreadSafe >::vector ( size_type  n,
const allocator_type alloc = allocator_type() 
)
inlineexplicit

Constructor.

Definition at line 62 of file vector.h.

◆ vector() [4/10]

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
atermpp::vector< T, Alloc, ThreadSafe >::vector ( size_type  n,
const value_type val,
const allocator_type alloc = allocator_type() 
)
inline

Definition at line 67 of file vector.h.

◆ vector() [5/10]

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
template<class InputIterator >
atermpp::vector< T, Alloc, ThreadSafe >::vector ( InputIterator  first,
InputIterator  last,
const allocator_type alloc = allocator_type() 
)
inline

Constructor.

Definition at line 74 of file vector.h.

◆ vector() [6/10]

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
atermpp::vector< T, Alloc, ThreadSafe >::vector ( const vector< T, Alloc, ThreadSafe > &  x)
inline

Constructor.

Definition at line 80 of file vector.h.

◆ vector() [7/10]

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
atermpp::vector< T, Alloc, ThreadSafe >::vector ( const vector< T, Alloc, ThreadSafe > &  x,
const allocator_type alloc 
)
inline

Constructor.

Definition at line 86 of file vector.h.

◆ vector() [8/10]

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
atermpp::vector< T, Alloc, ThreadSafe >::vector ( vector< T, Alloc, ThreadSafe > &&  x)
inline

Constructor.

Definition at line 92 of file vector.h.

◆ vector() [9/10]

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
atermpp::vector< T, Alloc, ThreadSafe >::vector ( vector< T, Alloc, ThreadSafe > &&  x,
const allocator_type alloc 
)
inline

Constructor.

Definition at line 98 of file vector.h.

◆ vector() [10/10]

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
atermpp::vector< T, Alloc, ThreadSafe >::vector ( std::initializer_list< value_type il,
const allocator_type alloc = allocator_type() 
)
inline

Constructor. To be done later....

Definition at line 104 of file vector.h.

◆ ~vector()

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
atermpp::vector< T, Alloc, ThreadSafe >::~vector ( )
inline

Standard destructor.

Definition at line 116 of file vector.h.

Member Function Documentation

◆ clear()

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
void atermpp::vector< T, Alloc, ThreadSafe >::clear ( )
inlinenoexcept

Definition at line 129 of file vector.h.

◆ emplace()

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
template<class... Args>
iterator atermpp::vector< T, Alloc, ThreadSafe >::emplace ( const_iterator  pos,
Args &&...  args 
)
inline

Definition at line 200 of file vector.h.

◆ emplace_back()

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
template<class... Args>
reference atermpp::vector< T, Alloc, ThreadSafe >::emplace_back ( Args &&...  args)
inline

Definition at line 262 of file vector.h.

◆ erase() [1/2]

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
iterator atermpp::vector< T, Alloc, ThreadSafe >::erase ( const_iterator  first,
const_iterator  last 
)
inline

Definition at line 222 of file vector.h.

◆ erase() [2/2]

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
iterator atermpp::vector< T, Alloc, ThreadSafe >::erase ( const_iterator  pos)
inline

Definition at line 211 of file vector.h.

◆ insert() [1/5]

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
iterator atermpp::vector< T, Alloc, ThreadSafe >::insert ( const_iterator  pos,
const T &  value 
)
inline

Definition at line 140 of file vector.h.

◆ insert() [2/5]

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
template<class InputIt >
iterator atermpp::vector< T, Alloc, ThreadSafe >::insert ( const_iterator  pos,
InputIt  first,
InputIt  last 
)
inline

Definition at line 176 of file vector.h.

◆ insert() [3/5]

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
iterator atermpp::vector< T, Alloc, ThreadSafe >::insert ( const_iterator  pos,
size_type  count,
const T &  value 
)
inline

Definition at line 164 of file vector.h.

◆ insert() [4/5]

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
iterator atermpp::vector< T, Alloc, ThreadSafe >::insert ( const_iterator  pos,
std::initializer_list< T >  ilist 
)
inline

Definition at line 188 of file vector.h.

◆ insert() [5/5]

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
iterator atermpp::vector< T, Alloc, ThreadSafe >::insert ( const_iterator  pos,
T &&  value 
)
inline

Definition at line 153 of file vector.h.

◆ operator=() [1/2]

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
vector & atermpp::vector< T, Alloc, ThreadSafe >::operator= ( const vector< T, Alloc, ThreadSafe > &  x)
default

Assignment operator.

◆ operator=() [2/2]

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
vector & atermpp::vector< T, Alloc, ThreadSafe >::operator= ( vector< T, Alloc, ThreadSafe > &&  x)
default

Move assignment operator.

◆ pop_back()

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
void atermpp::vector< T, Alloc, ThreadSafe >::pop_back ( )
inline

Definition at line 273 of file vector.h.

◆ push_back() [1/2]

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
void atermpp::vector< T, Alloc, ThreadSafe >::push_back ( const T &  value)
inline

Definition at line 233 of file vector.h.

◆ push_back() [2/2]

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
void atermpp::vector< T, Alloc, ThreadSafe >::push_back ( T &&  value)
inline

Definition at line 247 of file vector.h.

◆ resize() [1/2]

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
void atermpp::vector< T, Alloc, ThreadSafe >::resize ( size_type  count)
inline

Definition at line 287 of file vector.h.

◆ resize() [2/2]

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
void atermpp::vector< T, Alloc, ThreadSafe >::resize ( size_type  count,
const value_type value 
)
inline

Definition at line 301 of file vector.h.

◆ shrink_to_fit()

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
void atermpp::vector< T, Alloc, ThreadSafe >::shrink_to_fit ( )
inline

Definition at line 118 of file vector.h.

◆ size()

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
std::size_t atermpp::vector< T, Alloc, ThreadSafe >::size ( ) const
inline

Definition at line 329 of file vector.h.

◆ swap()

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
void atermpp::vector< T, Alloc, ThreadSafe >::swap ( vector< T, Alloc, ThreadSafe > &  other)
inlinenoexcept

Definition at line 315 of file vector.h.

Member Data Documentation

◆ container_wrapper

template<class T , class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false>
detail::generic_aterm_container<std::vector<detail::reference_aterm<T>, Alloc> > atermpp::vector< T, Alloc, ThreadSafe >::container_wrapper
protected

Definition at line 38 of file vector.h.


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