![]() SourcePro C++ 12.5 |
SourcePro® C++ API Reference Guide |
Product Documentation: SourcePro C++ Documentation Home |
A pointer-based collection of values implemented as a vector. More...
#include <rw/tpvector.h>
Inherits RWPtrVector.
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 RWTPtrVector<T> is a simple parameterized vector of pointers to objects of type T. It is most useful when you know precisely how many pointers must be held in the collection. If the intention is to insert an unknown number of objects into a collection, then class RWTPtrOrderedVector<T,A> may be a better choice. Class T can be of any type.
Isomorphic
Program output (if run on June 18, 2009):
| typedef const_pointer RWTPtrVector< T >::const_iterator |
A type that provides a const random-access iterator over the elements in the container.
| typedef const value_type* RWTPtrVector< T >::const_pointer |
A type that provides a const pointer to an element in the container.
| typedef const value_type& RWTPtrVector< T >::const_reference |
A type that provides a const reference to an element in the container.
| typedef std::reverse_iterator<const_iterator> RWTPtrVector< T >::const_reverse_iterator |
A type that provides a const random-access, reverse-order iterator over the elements in the container.
| typedef ptrdiff_t RWTPtrVector< T >::difference_type |
A signed integral type used to indicate the distance between two valid iterators on the same container.
| typedef pointer RWTPtrVector< T >::iterator |
A type that provides a random-access iterator over the elements in the container.
| typedef value_type* RWTPtrVector< T >::pointer |
A type that provides a pointer to an element in the container.
| typedef value_type& RWTPtrVector< T >::reference |
A type that provides a reference to an element in the container.
| typedef std::reverse_iterator<iterator> RWTPtrVector< T >::reverse_iterator |
A type that provides a random-access, reverse-order iterator over the elements in the container.
| typedef size_t RWTPtrVector< T >::size_type |
An unsigned integral type used for counting the number of elements in the container.
| typedef T* RWTPtrVector< 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 initial values of the elements are undefined. Hence, they can (and probably will) be garbage.
|
inline |
Constructs a vector of length n, with each element pointing to the item ival.
|
inline |
Copy constructor. The constructed vector is a shallow copy of rhs. The two vectors will then have the same length, and pointers held by the two vectors will point to the same items.
|
inline |
Move constructor. The constructed vector takes ownership of the data owned by rhs.
|
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 the i th value in the vector. The index i must be between zero and the length of the vector, less one. No bounds checking is performed.
|
inline |
Returns the i th value in the vector. The index i must be between zero and the length of the vector, less one. No bounds checking is performed.
|
inline |
Sets self to a shallow copy of rhs. The two vectors will then have the same length, and pointers held by the two vectors will point to the same items.
|
inline |
Move assignment. Self takes ownership of the data owned by rhs.
|
inline |
Sets all elements in self to point to the item p.
|
inline |
Returns the i th value in the vector.
| RWBoundsErr | Thrown if the index i is not between zero and the length of the vector, less one. |
|
inline |
Returns the i th value in the vector.
| RWBoundsErr | Thrown if the index i is not between zero and the length of the vector, less one. |
|
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.
|
inline |
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 undefined.
|
inline |
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 to rwnil.
|
inline |
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.