theplu::yat::utility::Range< T > Class Template Reference

A class for storing a shallow copy of a Range. More...

#include <yat/utility/Range.h>

List of all members.

Public Types

typedef T iterator_type

Public Member Functions

 Range (void)
 Default Constructor.
 Range (T first, T last)
 Constructor.
begin (void) const
end (void) const
Rangeoperator= (const Range &)
 Does not modify underlying data.


Detailed Description

template<typename T>
class theplu::yat::utility::Range< T >

A class for storing a shallow copy of a Range.

This class can be used to create a shallow copy of range, [first, end), defined by two iterators of type T. This can be useful, for example, when creating numerous sub-ranges of a larger container.

Since:
New in yat 0.5

Member Typedef Documentation

template<typename T>
typedef T theplu::yat::utility::Range< T >::iterator_type

Iterator type T.


Member Function Documentation

template<typename T>
T theplu::yat::utility::Range< T >::begin ( void   )  const [inline]

Note:
If T is a mutable iterator, it is possible to use returned iterator to modify underlying range although this function is const.
Returns:
iterator indicating beginning of Range.

template<typename T>
T theplu::yat::utility::Range< T >::end ( void   )  const [inline]

Returns:
iterator after the Range.

template<typename T>
Range< T > & theplu::yat::utility::Range< T >::operator= ( const Range< T > &  rhs  )  [inline]

Does not modify underlying data.

This only changes this object by reassigning two iterators, begin() and end(). If you would like to modify the underlying data, use std::copy instead.


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

Generated on Tue Jan 18 02:20:11 2011 for yat by  doxygen 1.5.5