Instigate Open Source Documentation

instigate::stl::interface< T > Struct Template Reference

Generic interface for iterator specialization. More...

#include <iterator_interface.hpp>

List of all members.

Public Types

typedef std::iterator_traits
< T >::iterator_category 
iterator_category
 Iterator_category is used to determine the category to which an iterator belongs.
typedef std::iterator_traits
< T >::value_type 
value_type
 An iterator's value type is the type of object returned when the iterator is dereferenced.
typedef std::iterator_traits
< T >::difference_type 
difference_type
 Difference_type is used to represent the distance between two iterators.

Static Public Member Functions

static void increment (T &a)
 Increment the argument.
static void decrement (T &a)
 Decrement the argument.
static const value_typeconst_dereference (const T &a)
 Dereference the iterator.
static void advance (T &a, const difference_type &n)
 Advance the first argument by n.
static difference_type distance (const T &a, const T &b)
 Find the distance between a and b.
static void dereference_assign (T a, const value_type &b)
 Assign b to dereference of a.
static value_typedereference (const T &a)
 Dereference the iterator.


Detailed Description

template<typename T>
struct instigate::stl::interface< T >

Generic interface for iterator specialization.

This is a "non-intrusive" interface of iterator concept. It's methods and associative types are used in the Instigate STL algorithms. This interface works by default with SGI STL iterators and C style arrays. Users must specialize this interface for custom iterator, if the names of the iterator's methods and associated types don't coincide with the ones of defined in SGI STL.


Member Function Documentation

template<typename T>
static void instigate::stl::interface< T >::increment ( T &  a  )  [inline, static]

Increment the argument.

Parameters:
a - argument to be incremented

Referenced by instigate::stl::incrementable_iterator::interface< T >::increment().

template<typename T>
static void instigate::stl::interface< T >::decrement ( T &  a  )  [inline, static]

Decrement the argument.

Parameters:
a - argument to be decremented

Referenced by instigate::stl::bidirectional_iterator::interface< T >::decrement().

template<typename T>
static const value_type& instigate::stl::interface< T >::const_dereference ( const T &  a  )  [inline, static]

Dereference the iterator.

Parameters:
a - iterator to be dereferenced
Returns:
The return value is constant content of a, that is the object can not be modifiable

Referenced by instigate::stl::readable_iterator::interface< T >::const_dereference().

template<typename T>
static void instigate::stl::interface< T >::advance ( T &  a,
const difference_type n 
) [inline, static]

Advance the first argument by n.

Parameters:
a - the argument to be advanced
n - the number of elements to advance

Referenced by instigate::stl::random_access_iterator::interface< T >::advance().

template<typename T>
static difference_type instigate::stl::interface< T >::distance ( const T &  a,
const T &  b 
) [inline, static]

Find the distance between a and b.

Parameters:
a - the first argument
b - the second argument
Returns:
The distance between a and b

Referenced by instigate::stl::random_access_iterator::interface< T >::distance().

template<typename T>
static void instigate::stl::interface< T >::dereference_assign ( a,
const value_type b 
) [inline, static]

Assign b to dereference of a.

Parameters:
a - object to be dereference and assigned
b - object to assign

Referenced by instigate::stl::writable_iterator::interface< T >::dereference_assign().

template<typename T>
static value_type& instigate::stl::interface< T >::dereference ( const T &  a  )  [inline, static]

Dereference the iterator.

Parameters:
a - iterator to be dereferenced
Returns:
The return value is content of a.

Referenced by instigate::stl::lvalue_iterator::interface< T >::dereference().


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


© Instigate CJSC, Open Source