Rosetta Utilities  2014.35
Public Types | Public Member Functions | Private Types | List of all members
utility::vector1< T, A > Class Template Reference

std::vector with 1-based indexing More...

#include <vector1.hh>

Public Types

typedef super::value_type value_type
 
typedef super::reference reference
 
typedef super::const_reference const_reference
 
typedef super::pointer pointer
 
typedef super::const_pointer const_pointer
 
typedef super::iterator iterator
 
typedef super::const_iterator const_iterator
 
typedef super::reverse_iterator reverse_iterator
 
typedef
super::const_reverse_iterator 
const_reverse_iterator
 
typedef super::size_type size_type
 
typedef super::difference_type difference_type
 
typedef super::allocator_type allocator_type
 
typedef super::index_type index_type
 
typedef super::ssize_type ssize_type
 
typedef super::Value Value
 
typedef super::Reference Reference
 
typedef super::ConstReference ConstReference
 
typedef super::Pointer Pointer
 
typedef super::ConstPointer ConstPointer
 
typedef super::Iterator Iterator
 
typedef super::ConstIterator ConstIterator
 
typedef super::ReverseIterator ReverseIterator
 
typedef super::ConstReverseIterator ConstReverseIterator
 
typedef super::Size Size
 
typedef super::Difference Difference
 
typedef super::Allocator Allocator
 
typedef super::Index Index
 
typedef super::SSize SSize
 

Public Member Functions

 vector1 (allocator_type const &alloc=allocator_type())
 Default constructor. More...
 
 vector1 (vector1 const &v)
 Copy constructor. More...
 
template<ssize_type L_, typename T_ , typename A_ >
 vector1 (vectorL< L_, T_, A_ > const &v)
 Assignable copy constructor. More...
 
 vector1 (super const &v)
 std::vector constructor More...
 
template<typename T_ , typename A_ >
 vector1 (std::vector< T_, A_ > const &v)
 Assignable std::vector constructor. More...
 
 vector1 (size_type const num)
 Size constructor. More...
 
 vector1 (size_type const num, value_type const &value, allocator_type const &alloc=allocator_type())
 Uniform value constructor. More...
 
template<typename InputIterator >
 vector1 (InputIterator const beg, InputIterator const end, allocator_type const &alloc=allocator_type())
 Iterator range constructor. More...
 
virtual ~vector1 ()
 Destructor. More...
 
vector1operator= (vector1 const &v)
 Copy assignment. More...
 
template<ssize_type L_, typename T_ , typename A_ >
vector1operator= (vectorL< L_, T_, A_ > const &v)
 Assignable copy assignment. More...
 
vector1operator= (super const &v)
 std::vector assignment More...
 
template<typename T_ , typename A_ >
vector1operator= (std::vector< T_, A_ > const &v)
 Assignable std::vector assignment. More...
 
int index (T const t) const
 Find the index of an element. If not found then return 0;. More...
 
bool has_value (T const t) const
 useful function – was commented out previously due, I think, to a conflict with has() in OptionKeys! Now renamed to has_value(). More...
 

Private Types

typedef vectorL< 1, T, A > super
 

Detailed Description

template<typename T, typename A = std::allocator< T >>
class utility::vector1< T, A >

std::vector with 1-based indexing

Member Typedef Documentation

template<typename T, typename A = std::allocator< T >>
typedef super::Allocator utility::vector1< T, A >::Allocator
template<typename T, typename A = std::allocator< T >>
typedef super::allocator_type utility::vector1< T, A >::allocator_type
template<typename T, typename A = std::allocator< T >>
typedef super::const_iterator utility::vector1< T, A >::const_iterator
template<typename T, typename A = std::allocator< T >>
typedef super::const_pointer utility::vector1< T, A >::const_pointer
template<typename T, typename A = std::allocator< T >>
typedef super::const_reference utility::vector1< T, A >::const_reference
template<typename T, typename A = std::allocator< T >>
typedef super::const_reverse_iterator utility::vector1< T, A >::const_reverse_iterator
template<typename T, typename A = std::allocator< T >>
typedef super::ConstIterator utility::vector1< T, A >::ConstIterator
template<typename T, typename A = std::allocator< T >>
typedef super::ConstPointer utility::vector1< T, A >::ConstPointer
template<typename T, typename A = std::allocator< T >>
typedef super::ConstReference utility::vector1< T, A >::ConstReference
template<typename T, typename A = std::allocator< T >>
typedef super::ConstReverseIterator utility::vector1< T, A >::ConstReverseIterator
template<typename T, typename A = std::allocator< T >>
typedef super::Difference utility::vector1< T, A >::Difference
template<typename T, typename A = std::allocator< T >>
typedef super::difference_type utility::vector1< T, A >::difference_type
template<typename T, typename A = std::allocator< T >>
typedef super::Index utility::vector1< T, A >::Index
template<typename T, typename A = std::allocator< T >>
typedef super::index_type utility::vector1< T, A >::index_type
template<typename T, typename A = std::allocator< T >>
typedef super::iterator utility::vector1< T, A >::iterator
template<typename T, typename A = std::allocator< T >>
typedef super::Iterator utility::vector1< T, A >::Iterator
template<typename T, typename A = std::allocator< T >>
typedef super::pointer utility::vector1< T, A >::pointer
template<typename T, typename A = std::allocator< T >>
typedef super::Pointer utility::vector1< T, A >::Pointer
template<typename T, typename A = std::allocator< T >>
typedef super::reference utility::vector1< T, A >::reference
template<typename T, typename A = std::allocator< T >>
typedef super::Reference utility::vector1< T, A >::Reference
template<typename T, typename A = std::allocator< T >>
typedef super::reverse_iterator utility::vector1< T, A >::reverse_iterator
template<typename T, typename A = std::allocator< T >>
typedef super::ReverseIterator utility::vector1< T, A >::ReverseIterator
template<typename T, typename A = std::allocator< T >>
typedef super::Size utility::vector1< T, A >::Size
template<typename T, typename A = std::allocator< T >>
typedef super::size_type utility::vector1< T, A >::size_type
template<typename T, typename A = std::allocator< T >>
typedef super::SSize utility::vector1< T, A >::SSize
template<typename T, typename A = std::allocator< T >>
typedef super::ssize_type utility::vector1< T, A >::ssize_type
template<typename T, typename A = std::allocator< T >>
typedef vectorL< 1, T, A > utility::vector1< T, A >::super
private
template<typename T, typename A = std::allocator< T >>
typedef super::Value utility::vector1< T, A >::Value
template<typename T, typename A = std::allocator< T >>
typedef super::value_type utility::vector1< T, A >::value_type

Constructor & Destructor Documentation

template<typename T, typename A = std::allocator< T >>
utility::vector1< T, A >::vector1 ( allocator_type const &  alloc = allocator_type())
inlineexplicit

Default constructor.

template<typename T, typename A = std::allocator< T >>
utility::vector1< T, A >::vector1 ( vector1< T, A > const &  v)
inline

Copy constructor.

template<typename T, typename A = std::allocator< T >>
template<ssize_type L_, typename T_ , typename A_ >
utility::vector1< T, A >::vector1 ( vectorL< L_, T_, A_ > const &  v)
inline

Assignable copy constructor.

template<typename T, typename A = std::allocator< T >>
utility::vector1< T, A >::vector1 ( super const &  v)
inlineexplicit

std::vector constructor

template<typename T, typename A = std::allocator< T >>
template<typename T_ , typename A_ >
utility::vector1< T, A >::vector1 ( std::vector< T_, A_ > const &  v)
inlineexplicit

Assignable std::vector constructor.

template<typename T, typename A = std::allocator< T >>
utility::vector1< T, A >::vector1 ( size_type const  num)
inlineexplicit

Size constructor.

template<typename T, typename A = std::allocator< T >>
utility::vector1< T, A >::vector1 ( size_type const  num,
value_type const &  value,
allocator_type const &  alloc = allocator_type() 
)
inline

Uniform value constructor.

template<typename T, typename A = std::allocator< T >>
template<typename InputIterator >
utility::vector1< T, A >::vector1 ( InputIterator const  beg,
InputIterator const  end,
allocator_type const &  alloc = allocator_type() 
)
inline

Iterator range constructor.

template<typename T, typename A = std::allocator< T >>
virtual utility::vector1< T, A >::~vector1 ( )
inlinevirtual

Destructor.

Member Function Documentation

template<typename T, typename A = std::allocator< T >>
bool utility::vector1< T, A >::has_value ( T const  t) const
inline

useful function – was commented out previously due, I think, to a conflict with has() in OptionKeys! Now renamed to has_value().

template<typename T, typename A = std::allocator< T >>
int utility::vector1< T, A >::index ( T const  t) const
inline

Find the index of an element. If not found then return 0;.

template<typename T, typename A = std::allocator< T >>
vector1& utility::vector1< T, A >::operator= ( vector1< T, A > const &  v)
inline

Copy assignment.

template<typename T, typename A = std::allocator< T >>
template<ssize_type L_, typename T_ , typename A_ >
vector1& utility::vector1< T, A >::operator= ( vectorL< L_, T_, A_ > const &  v)
inline

Assignable copy assignment.

template<typename T, typename A = std::allocator< T >>
vector1& utility::vector1< T, A >::operator= ( super const &  v)
inline

std::vector assignment

template<typename T, typename A = std::allocator< T >>
template<typename T_ , typename A_ >
vector1& utility::vector1< T, A >::operator= ( std::vector< T_, A_ > const &  v)
inline

Assignable std::vector assignment.


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