lite::c_iterator< value_type_ > Class Template Reference
[Array Internals (Advanced)]

This class implements an iterator that returns the same value everywhere. More...

#include <array.hpp>

List of all members.

Public Types

typedef
std::random_access_iterator_tag 
iterator_category
typedef value_type_ value_type
typedef ptrdiff_t difference_type
typedef const value_type_ * pointer
typedef const value_type_ & reference

Public Member Functions

LITE_INLINE c_iterator (const value_type &value)
 Construct a c_iterator that returns value everywhere.
LITE_INLINE c_iterator (const c_iterator &other)
template<class other_value_type_ >
LITE_INLINE c_iterator (const c_iterator< other_value_type_ > &other)
LITE_INLINE c_iteratoroperator= (const c_iterator &other)
template<class other_value_type_ >
LITE_INLINE c_iteratoroperator= (const c_iterator< other_value_type_ > &other)

Public Attributes

value_type value
 This variable stores the value that is returned by c_iterator.

Detailed Description

template<class value_type_>
class lite::c_iterator< value_type_ >

This class implements an iterator that returns the same value everywhere.

The value can be specified as a constructor argument.

Example:
        c_iterator<float> it(1.5f);

        std::cout << at(it) << std::endl;
        std::cout << at(it, 2, 3, 4) << std::endl;
        shift<2>(it, -5);
        std::cout << at(it, 2, 3, 4) << std::endl;

        typedef array<float[2][2], default_traits_type, reference_rep<c_iterator<float> > A;

        A a(it, A::size_type());

        std::cout << a << std::endl;

The output would be:

        1.5
        1.5
        1.5
        1.5 1.5
        1.5 1.5
    

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

Generated on Fri Nov 6 02:03:21 2009 for Lite by  doxygen 1.6.0