Rosetta 3.3
Public Types | Public Member Functions
utility::OrderedTuple< T > Class Template Reference

The ordered tuple takes a container class T and defines comparison operators so that the tuple may be sorted. More...

#include <OrderedTuple.hh>

Collaboration diagram for utility::OrderedTuple< T >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef platform::Size Size
typedefcontainer
typedef container::const_iterator const_iterator
typedef container::iterator iterator

Public Member Functions

 OrderedTuple ()
 default constructor
 OrderedTuple (T const &data)
void assign_data (container const &val)
T const & data () const
const_iterator begin () const
const_iterator end () const
iterator begin ()
iterator end ()
Size size () const
bool operator< (OrderedTuple< T > const &rhs) const
 Strict ordering with preference given to the values closest to the containers begin() element.
bool operator== (OrderedTuple< T > const &rhs) const
 Simple comparison operator for the tuple. Sweeps from begin() to end();.

Detailed Description

template<class T>
class utility::OrderedTuple< T >

The ordered tuple takes a container class T and defines comparison operators so that the tuple may be sorted.

container class T must define stl-like "const_iterator" and "iterator" typedefs. T must return iterators with calls to begin() and end(). T must be copyable and assignable. T::value_type must be comparable.


Member Typedef Documentation

template<class T>
typedef T utility::OrderedTuple< T >::container
template<class T>
typedef container::iterator utility::OrderedTuple< T >::iterator

Constructor & Destructor Documentation

template<class T>
utility::OrderedTuple< T >::OrderedTuple ( ) [inline]

default constructor

template<class T>
utility::OrderedTuple< T >::OrderedTuple ( T const &  data) [inline]

Member Function Documentation

template<class T>
void utility::OrderedTuple< T >::assign_data ( container const &  val) [inline]
template<class T>
iterator utility::OrderedTuple< T >::begin ( ) [inline]
template<class T>
const_iterator utility::OrderedTuple< T >::begin ( ) const [inline]
template<class T>
T const& utility::OrderedTuple< T >::data ( ) const [inline]
template<class T>
const_iterator utility::OrderedTuple< T >::end ( ) const [inline]
template<class T>
iterator utility::OrderedTuple< T >::end ( ) [inline]
template<class T>
bool utility::OrderedTuple< T >::operator< ( OrderedTuple< T > const &  rhs) const [inline]

Strict ordering with preference given to the values closest to the containers begin() element.

References utility::OrderedTuple< T >::size().

template<class T>
bool utility::OrderedTuple< T >::operator== ( OrderedTuple< T > const &  rhs) const [inline]

Simple comparison operator for the tuple. Sweeps from begin() to end();.

References utility::OrderedTuple< T >::size().

template<class T>
Size utility::OrderedTuple< T >::size ( ) const [inline]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines