Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Tools Module Reference Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

rw_slist<T,A>

Module:  Essential Tools Module   Group:  STL Extension-based Collection Classes


Does not inherit

Local Index

Members

Non-Members

Synopsis

#include <rw/stdex/slist.h> 
rw_slist<T,A=std::allocator<T>>;

rw_slist<T,A> requires the C++ Standard Library.

Description

Class rw_slist<T,A> 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<T,A> provides for iterators that reference its elements. Operations that alter the contents of rw_slist<T,A> 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,A>();
rw_slist<T,A>(const rw_slist<T,A>& list);
rw_slist<T,A>(size_type count, const T& value);
rw_slist<T,A>(const_iterator first, const_iterator bound);
rw_slist<T,A>(const T* first, const T* bound);

Public Destructor

~rw_slist<T,A>();

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,A>& other);
void
unique();

Special Methods for Lists

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

Related Global Operators

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


Previous fileTop of DocumentContentsIndex pageNext file

© 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.
Contact Rogue Wave about documentation or support issues.