Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Private Attributes | List of all members
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>

Public Types

typedef platform::Size Size
 
typedef T container
 
typedef container::const_iterator const_iterator
 
typedef container::iterator iterator
 

Public Member Functions

 OrderedTuple ()
 default constructor More...
 
 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. More...
 
bool operator== (OrderedTuple< T > const &rhs) const
 Simple comparison operator for the tuple. Sweeps from begin() to end();. More...
 

Private Attributes

container data_
 

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 container::const_iterator utility::OrderedTuple< T >::const_iterator
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 >
const_iterator utility::OrderedTuple< T >::begin ( ) const
inline
template<class T >
iterator utility::OrderedTuple< T >::begin ( )
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 >::data_, debug_assert, and 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 >::data_, debug_assert, and utility::OrderedTuple< T >::size().

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

Member Data Documentation

template<class T >
container utility::OrderedTuple< T >::data_
private

The documentation for this class was generated from the following files: