![]() SourcePro C++ 12.5 |
SourcePro® C++ API Reference Guide |
Product Documentation: SourcePro C++ Documentation Home |
A value-based collection of values implemented as a vector. More...
#include <rw/tvvector.h>
Inherited by RWClassicTValOrderedVector< T > [private].
Public Types | |
| typedef const_pointer | const_iterator |
| typedef const value_type * | const_pointer |
| typedef const value_type & | const_reference |
| typedef std::reverse_iterator < const_iterator > | const_reverse_iterator |
| typedef ptrdiff_t | difference_type |
| typedef pointer | iterator |
| typedef value_type * | pointer |
| typedef value_type & | reference |
| typedef std::reverse_iterator < iterator > | reverse_iterator |
| typedef size_t | size_type |
| typedef T | value_type |
Class RWTValVector<T> is a simple parameterized vector of objects of type T. It is most useful when you know precisely how many objects have to be held in the collection. If the intention is to "insert" an unknown number of objects, then class RWTValOrderedVector<T,A> may be a better choice.
The class T must have:
T::T(const T&) or equivalent),T::operator=(const T& or equivalent), andIsomorphic
Program output (if this is run on June 19, 2009):
| typedef const_pointer RWTValVector< T >::const_iterator |
A type that provides a const random-access iterator over the elements in the container.
| typedef const value_type* RWTValVector< T >::const_pointer |
A type that provides a const pointer to an element in the container.
| typedef const value_type& RWTValVector< T >::const_reference |
A type that provides a const reference to an element in the container.
| typedef std::reverse_iterator<const_iterator> RWTValVector< T >::const_reverse_iterator |
A type that provides a const random-access, reverse-order iterator over the elements in the container.
| typedef ptrdiff_t RWTValVector< T >::difference_type |
A signed integral type used to indicate the distance between two valid iterators on the same container.
| typedef pointer RWTValVector< T >::iterator |
A type that provides a random-access iterator over the elements in the container.
| typedef value_type* RWTValVector< T >::pointer |
A type that provides a pointer to an element in the container.
| typedef value_type& RWTValVector< T >::reference |
A type that provides a reference to an element in the container.
| typedef std::reverse_iterator<iterator> RWTValVector< T >::reverse_iterator |
A type that provides a random-access, reverse-order iterator over the elements in the container.
| typedef size_t RWTValVector< T >::size_type |
An unsigned integral type used for counting the number of elements in the container.
| typedef T RWTValVector< T >::value_type |
A type representing the container's data type.
|
inline |
Constructs an empty vector of length zero.
|
inline |
Constructs a vector of length n. The values of the elements are set by the default constructor of class value_type.
| RWTValVector< T >::RWTValVector | ( | size_type | n, |
| const_reference | ival | ||
| ) |
Constructs a vector of length n, with each element initialized to the value ival.
| RWTValVector< T >::RWTValVector | ( | const RWTValVector< T > & | rhs | ) |
Constructs self as a copy of rhs. Each element in rhs is copied into self.
| RWTValVector< T >::RWTValVector | ( | RWTValVector< T > && | rhs | ) |
Move constructor. The constructed vector takes ownership of the data owned by rhs.
|
inline |
Calls the destructor for every element in self.
|
inline |
Returns an iterator referring to the first element in the container.
If the container is empty, returns end().
|
inline |
Returns an iterator referring to the first element in the container.
If the container is empty, returns end().
|
inline |
Returns an iterator referring to the first element in the container.
If the container is empty, returns end().
|
inline |
Returns an iterator referring to the element after the last element in the container.
Dereferencing the iterator returned by this function results in undefined behavior.
|
inline |
Returns an iterator referring to the last element in the container.
If the container is empty, returns rend().
|
inline |
Returns an iterator referring to the element before the first element in the container.
Dereferencing the iterator returned by this function results in undefined behavior.
|
inline |
Returns a pointer to the first element of the vector. The value returned is undefined if the vector is empty.
|
inline |
Returns a pointer to the first element of the vector. The value returned is undefined if the vector is empty.
|
inline |
Returns an iterator referring to the element after the last element in the container.
Dereferencing the iterator returned by this function results in undefined behavior.
|
inline |
Returns an iterator referring to the element after the last element in the container.
Dereferencing the iterator returned by this function results in undefined behavior.
|
inline |
Returns the length of the vector.
|
inline |
Returns a reference to the i th value in the vector. Index i should be between 0 and one less than the number of entries, otherwise the results are undefined.
|
inline |
Returns a reference to the i th value in the vector. Index i should be between 0 and one less than the number of entries, otherwise the results are undefined.
| RWTValVector<T>& RWTValVector< T >::operator= | ( | const RWTValVector< T > & | rhs | ) |
Sets self to the same length as rhs and then copies all elements of rhs into self.
| RWTValVector<T>& RWTValVector< T >::operator= | ( | RWTValVector< T > && | rhs | ) |
Move assignment. Self takes ownership of the data owned by rhs.
| RWTValVector<T>& RWTValVector< T >::operator= | ( | const_reference | ival | ) |
Sets all elements in self to the value ival.
|
inline |
Returns a reference to the i th value in the vector.
| RWBoundsErr | Thrown if index i is not between 0 and one less than the number of entries in self. |
|
inline |
Returns a reference to the i th value in the vector.
| RWBoundsErr | Thrown if index i is not between 0 and one less than the number of entries in self. |
|
inline |
Returns an iterator referring to the last element in the container.
If the container is empty, returns rend().
|
inline |
Returns an iterator referring to the last element in the container.
If the container is empty, returns rend().
|
inline |
Returns an iterator referring to the element before the first element in the container.
Dereferencing the iterator returned by this function results in undefined behavior.
|
inline |
Returns an iterator referring to the element before the first element in the container.
Dereferencing the iterator returned by this function results in undefined behavior.
| void RWTValVector< T >::reshape | ( | size_type | N | ) |
Changes the length of the vector to N. If this increases the length of the vector, then the initial value of the additional elements is set by the default constructor of value_type.
| void RWTValVector< T >::swap | ( | RWTValVector< T > & | rhs | ) |
Swaps the data owned by self with the data owned by rhs.
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.