Rogue Wave banner
Previous fileTop of documentContentsIndexNext file

rw_slist<T>

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Synopsis

#include <rw/rwstdex/slist.h>
rw_slist<T> list;

rw_slist requires the Standard C++ Library.


Description

Class rw_slist<T> maintains a collection of T, implemented as a singly-linked list. Since this is a value based list, objects are copied into and out of the links that make up the list. As with all classes that meet the ANSI sequence specification, rw_slist provides for iterators that reference its elements. Operations that alter the contents of rw_slist will invalidate iterators that reference items at or after the location of change.

Public Typedefs

typedef T                  value_type;
typedef T&                 reference;
typedef const T&           const_reference; 
typedef (unsigned)         size_type; //from Allocator<Node>
typedef (scoped Iterator)       iterator; 
typedef (scoped ConstIterator)  const_iterator; 

Public Constructors

rw_slist<T>();
rw_slist<T>(const rw_slist<T>& list);
rw_slist<T>(size_type count, const T& value);
rw_slist<T>(const_iterator first, const_iterator bound);
rw_slist<T>(const T* first, const T* bound);

Public Destructor

~rw_slist<T>();

Accessors

iterator
begin();
const_iterator
begin() const;
iterator
end();
const_iterator
end() const;
T&
front();
const T&
front();

Const Public Member Functions

bool
empty() const;
size_type
size() const;

Mutators

iterator
erase(iterator iter);
iterator
erase(iterator first, iterator bound);
iterator
insert(iterator loc, const T& val);
iterator
insert(iterator loc, const_iterator first, const_iterator bound);
iterator
insert(iterator loc, const T* first, const T* bound);
void
pop_front();
void
push_back(const T& item);
void
push_front(const T& item);
void
reverse();
void
sort();
void
swap(rw_slist<T>& other);
void
unique();

Special Methods for Lists

void
merge(rw_slist& donor);
void
splice(iterator to, rw_slist<T>& donor);
void
splice(iterator to, rw_slist<T>& donor, iterator from);
void
splice(iterator to, rw_slist<T>& donor, iterator from_start, 
       iterator from_bound);

Related Global Operators

bool
operator==(const rw_slist<T>& lhs, const rw_slist<T>& rhs);
bool
operator<(const rw_slist<T>& lhs, const rw_slist<T>& rhs);


Previous fileTop of documentContentsIndexNext file
©Copyright 1999, Rogue Wave Software, Inc.
Send mail to report errors or comment on the documentation.