Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Tools Module Reference Guide

RWTPtrOrderedVector<T,A>

Module:  Essential Tools Module   Group:  STL-based Collection


Does not inherit

Local Index

Members

Non-Members

Synopsis

#include <rw/tpordvec.h> 
RWTPtrOrderedVector<T,A>  ordvec;

Description

This class maintains a pointer-based collection of values, implemented as a vector. Class T is the type pointed to by the items in the collection.

Persistence

Isomorphic

Example

In this example, a pointer-based vector of type RWDate is exercised.

Program Output:

Related Classes

Classes RWTPtrDeque<T,A>, RWTPtrSlist<T,A>, and RWTPtrDlist<T,A> also provide a Rogue Wave pointer-based interface to C++-standard sequence collections.

Class vector<T*,A<T*> > is the C++-standard collection that serves as the underlying implementation for this class.

Public Typedefs

typedef vector<T*,A<T*> >  container_type; 
typedef typename container_type::iterator iterator; 
typedef typename container_type::const_iterator
  const_iterator; 
typedef typename container_type::size_type  size_type; 
typedef typename container_type::difference_type
  difference_type; 
typedef T* value_type; 
typedef T*& reference; 
typedef T* const& const_reference; 

Public Constructors

RWTPtrOrderedVector<T,A>();
RWTPtrOrderedVector<T,A> 
  (const RWTPtrOrderedVector<T,A> & rwvec);
RWTPtrOrderedVector<T,A> (const vector<T*,A>& vec);
RWTPtrOrderedVector<T,A> (size_type n, T* a);
RWTPtrOrderedVector<T,A> (T* const* first,T* const* last);

Public Member Operators

RWTPtrOrderedVector<T,A> &
operator=(const RWTPtrOrderedVector<T,A> & vec); 
RWTPtrOrderedVector<T,A> &
operator=(const vector<T*,A>& vec);
bool
operator<(const RWTPtrOrderedVector<T,A> & vec) const; 
bool
operator==(const RWTPtrOrderedVector<T,A> & vec) const; 
reference
operator()(size_type i); 
const_reference
operator()(size_type i) const;
reference
operator[](size_type i); 
const_reference
operator[](size_type i) const;

Public Member Functions

void
append(T* a); 
void
apply(void (*fn)(T*&,void*), void* d); 
void
apply(void (*fn)(T*,void*), void* d);
void
apply(void (*fn)(const T*,void*), void* d) const;
reference
at(size_type i); 
const_reference
at(size_type i) const;
iterator
begin();
const_iterator
begin() const;
void
clear();
void
clearAndDestroy();
bool
contains(const T* a) const; 
bool
contains(bool (*fn)(T*,void*), void* d) const; 
bool
contains(bool (*fn)(const T*,void*), void* d) const;
T*const*
data() const; 
iterator
end();
const_iterator
end() const;
size_type
entries();
T*
find(const T* a) const; 
T*
find(bool (*fn)(T*,void*), void* d) const; 
T*
find(bool (*fn)(const T*,void*), void* d) const;
reference
first();
const_reference
first() const;
size_type
index(const T* a) const; 
size_type
index(bool (*fn)(T*,void*), void* d) const;
size_type
index(bool (*fn)(const T*,void*), void* d) const;
bool
insert(T* a); 
void
insertAt(size_type i, T* a); 
bool
isEmpty() const; 
T*&
last();
T*const&
last() const;
size_type
length() const; 
reference
maxElement();
const_reference
maxElement() const;
reference
minElement();
const_reference
minElement() const;
size_type
occurrencesOf(const T* a) const; 
size_type
occurrencesOf(bool (*fn)(T*,void*),void* d) const;
size_type
occurrencesOf(bool (*fn)(const T*,void*),void* d) const;
void
prepend(T* a); 
T*
remove(const T* a); 
T*
remove(bool (*fn)( T*,void*), void* d); 
T*
remove(bool (*fn)(const T*,void*), void* d);
size_type
removeAll(const T* a); 
size_type
removeAll(bool (*fn)(T*,void*), void* d);
size_type
removeAll(bool (*fn)(const T*,void*), void* d);
T*
removeAt(size_type i); 
T*
removeFirst();
T*
removeLast();
size_type
replaceAll(const T* oldVal, T* newVal); 
size_type
replaceAll(bool (*fn)(T*, void*),void* x,T* newVal);
size_type
replaceAll(bool (*fn)(const T*, void*),void* x,T* newVal);
void
resize(size_type n); 
void
sort();
vector<T*,A<T*> >&
std();
const vector<T*,A<T*> >&
std() const;

Related Global Operators

RWvostream&
operator<<(RWvostream& strm, const RWTPtrOrderedVector<T,A> & coll); 
RWFile&
operator<<(RWFile& strm, const RWTPtrOrderedVector<T,A> & coll);
RWvistream&
operator>>(RWvistream& strm, RWTPtrOrderedVector<T,A> & coll); 
RWFile&
operator>>(RWFile& strm, RWTPtrOrderedVector<T,A> & coll);
RWvistream&
operator>>(RWvistream& strm, RWTPtrOrderedVector<T,A> *& p);
RWFile&
operator>>(RWFile& strm, RWTPtrOrderedVector<T,A> *& p);


Previous fileTop of DocumentContentsIndex pageNext file

©2004 Copyright Quovadx, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.