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

RWTValDlist<T,A>

Module:  Essential Tools Module   Group:  STL-based Collection


Does not inherit

Local Index

Members

Non-Members

Synopsis

#include <rw/tvdlist.h> 
RWTValDlist<T,A> dlist;

Description

This class maintains a collection of values, implemented as a doubly-linked list.

Persistence

Isomorphic

Example

In this example, a doubly-linked list of user type Dog is exercised.

Program Output:

Related Classes

Classes RWTValDeque<T,A>, RWTValSlist<T,A>, and RWTValOrderedVector<T,A> also provide a Rogue Wave interface to C++-standard sequence collections.

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

Public Typedefs

typedef list<T,A> 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 T value_type; 
typedef T& reference; 
typedef const T& const_reference; 

Public Constructors

RWTValDlist<T,A>();
RWTValDlist<T,A>(const list<T,A<T*> >& lst);
RWTValDlist<T,A>(const RWTValDlist<T,A>& rwlst);
RWTValDlist<T,A>(size_type n, const T& val = T());
RWTValDlist<T,A>(const T* first, const T* last);

Public Member Operators

RWTValDlist<T,A>&
operator=(const RWTValDlist<T,A>& lst); 
RWTValDlist<T,A>&
operator=(const list<T,A>& lst);
bool
operator<(const RWTValDlist<T,A>& lst) const; 
bool
operator<(const list<T,A>& lst) const;
bool
operator==(const RWTValDlist<T,A>& lst) const; 
bool
operator==(const list<T,A>& lst) 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(const_reference a); 
void
apply(void (*fn)(reference,void*), void* d); 
void
apply(void (*fn)(const_reference,void*), void* d) const;
reference
at(size_type i); 
const_reference
at(size_type i) const;
iterator
begin();
const_iterator
begin() const;
void
clear();
bool
contains(const_reference a) const; 
bool
contains(bool (*fn)(const_reference,void*), void* d) const;
iterator
end();
const_iterator
end() const;
size_type
entries() const; 
bool
find(const_reference a, T& k) const; 
bool
find(bool (*fn)(const_reference,void*), void* d, T& k)
     const;
reference
first();
const_reference
first() const;
T
get();
size_type
index(const_reference a) const; 
size_type
index(bool (*fn)(const_reference,void*), void* d) const;
bool
insert(const_reference a); 
void
insertAt(size_type i,const_reference a); 
bool
isEmpty() const; 
reference
last();
const_reference
last() const;
reference
maxElement();
const_reference
maxElement() const;
reference
minElement();
const_reference
minElement() const;
size_type 
occurrencesOf(const_reference a) const; 
size_type
occurrencesOf(bool (*fn)(const_reference,void*),void* d)
              const;
void
prepend(const_reference a); 
bool
remove(const_reference a); 
bool
remove(bool (*fn)(const_reference,void*), void* d);
size_type
removeAll(const_reference a); 
size_type
removeAll(bool (*fn)(const_reference,void*), void* d);
T
removeAt(size_type i); 
T
removeFirst();
T
removeLast();
size_type
replaceAll(const_reference oldVal, const_reference newVal); 
size_type
replaceAll(bool (*fn)(const_reference,void*), void* d,
           const value_type& newval);
void
sort();
list<T,A<T*> >&
std();
const list<T,A<T*> >&
std() const;

Related Global Operators

RWvostream&
operator<<(RWvostream& strm, const RWTValDlist<T,A>& coll);
RWFile&
operator<<(RWFile& strm, const RWTValDlist<T,A>& coll);
RWvistream&
operator>>(RWvistream& strm, RWTValDlist<T,A>& coll);
RWFile&
operator>>(RWFile& strm, RWTValDlist<T,A>& coll);
RWvistream&
operator>>(RWvistream& strm, RWTValDlist<T,A>*& p);
RWFile&
operator>>(RWFile& strm, RWTValDlist<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.