Rosetta 3.3
Public Types | Public Member Functions
utility::vector1< T, A > Class Template Reference

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

#include <vector1.hh>

Inheritance diagram for utility::vector1< T, A >:
Inheritance graph
[legend]
Collaboration diagram for utility::vector1< T, A >:
Collaboration graph
[legend]

List of all members.

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.
 vector1 (vector1 const &v)
 Copy constructor.
template<ssize_type L_, typename T_ , typename A_ >
 vector1 (vectorL< L_, T_, A_ > const &v)
 Assignable copy constructor.
 vector1 (super const &v)
 std::vector constructor
template<typename T_ , typename A_ >
 vector1 (std::vector< T_, A_ > const &v)
 Assignable std::vector constructor.
 vector1 (size_type const num)
 Size constructor.
 vector1 (size_type const num, value_type const &value, allocator_type const &alloc=allocator_type())
 Uniform value constructor.
template<typename InputIterator >
 vector1 (InputIterator const beg, InputIterator const end, allocator_type const &alloc=allocator_type())
 Iterator range constructor.
virtual ~vector1 ()
 Destructor.
vector1operator= (vector1 const &v)
 Copy assignment.
template<ssize_type L_, typename T_ , typename A_ >
vector1operator= (vectorL< L_, T_, A_ > const &v)
 Assignable copy assignment.
vector1operator= (super const &v)
 std::vector assignment
template<typename T_ , typename A_ >
vector1operator= (std::vector< T_, A_ > const &v)
 Assignable std::vector assignment.

Detailed Description

template<typename T, typename A>
class utility::vector1< T, A >

std::vector with 1-based indexing

vector1 is vectorL with the lower index set to 1.

Note:
  • std::vector with 1-based indexing and a few extras
  • Can construct and assign from std::vector and swap with std::vector
  • Can compare with std::vector: compares contents ignoring indexes
  • Can explicitly convert to std::vector
  • Public inheritance from concrete vectorL template is safe here

Member Typedef Documentation

template<typename T, typename A>
typedef super::Allocator utility::vector1< T, A >::Allocator

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::allocator_type utility::vector1< T, A >::allocator_type

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::const_iterator utility::vector1< T, A >::const_iterator

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::const_pointer utility::vector1< T, A >::const_pointer

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::const_reference utility::vector1< T, A >::const_reference

Reimplemented from utility::vectorL< 1, T, A >.

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::ConstIterator utility::vector1< T, A >::ConstIterator

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::ConstPointer utility::vector1< T, A >::ConstPointer

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::ConstReference utility::vector1< T, A >::ConstReference

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::ConstReverseIterator utility::vector1< T, A >::ConstReverseIterator

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::Difference utility::vector1< T, A >::Difference

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::difference_type utility::vector1< T, A >::difference_type

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::Index utility::vector1< T, A >::Index
template<typename T, typename A>
typedef super::index_type utility::vector1< T, A >::index_type
template<typename T, typename A>
typedef super::Iterator utility::vector1< T, A >::Iterator

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::iterator utility::vector1< T, A >::iterator

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::Pointer utility::vector1< T, A >::Pointer

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::pointer utility::vector1< T, A >::pointer

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::Reference utility::vector1< T, A >::Reference

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::reference utility::vector1< T, A >::reference

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::reverse_iterator utility::vector1< T, A >::reverse_iterator

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::ReverseIterator utility::vector1< T, A >::ReverseIterator

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::Size utility::vector1< T, A >::Size

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::size_type utility::vector1< T, A >::size_type

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::SSize utility::vector1< T, A >::SSize

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::ssize_type utility::vector1< T, A >::ssize_type

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::Value utility::vector1< T, A >::Value

Reimplemented from utility::vectorL< 1, T, A >.

template<typename T, typename A>
typedef super::value_type utility::vector1< T, A >::value_type

Reimplemented from utility::vectorL< 1, T, A >.


Constructor & Destructor Documentation

template<typename T, typename A>
utility::vector1< T, A >::vector1 ( allocator_type const &  alloc = allocator_type()) [inline, explicit]

Default constructor.

template<typename T, typename A>
utility::vector1< T, A >::vector1 ( vector1< T, A > const &  v) [inline]

Copy constructor.

template<typename T, typename A>
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>
utility::vector1< T, A >::vector1 ( super const &  v) [inline, explicit]

std::vector constructor

template<typename T, typename A>
template<typename T_ , typename A_ >
utility::vector1< T, A >::vector1 ( std::vector< T_, A_ > const &  v) [inline, explicit]

Assignable std::vector constructor.

template<typename T, typename A>
utility::vector1< T, A >::vector1 ( size_type const  num) [inline, explicit]

Size constructor.

template<typename T, typename A>
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>
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>
virtual utility::vector1< T, A >::~vector1 ( ) [inline, virtual]

Destructor.


Member Function Documentation

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

Copy assignment.

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

Assignable std::vector assignment.

Reimplemented from utility::vectorL< 1, T, A >.

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

std::vector assignment

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

Assignable copy assignment.

Reimplemented from utility::vectorL< 1, T, A >.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines