FastUIDraw
Public Types | Public Member Functions | Public Attributes | List of all members
fastuidraw::range_type< T > Class Template Reference

A class reprenting the STL range [m_begin, m_end). More...

#include <util.hpp>

Public Types

typedef T type
 

Public Member Functions

 range_type (T b, T e)
 
 range_type (void)
 
template<typename W = T>
difference (void) const
 
template<typename W >
void operator+= (const W &v)
 
template<typename W >
void operator-= (const W &v)
 
void sanitize (void)
 

Public Attributes

type m_begin
 
type m_end
 

Detailed Description

template<typename T>
class fastuidraw::range_type< T >

A class reprenting the STL range [m_begin, m_end).

Definition at line 392 of file util.hpp.

Member Typedef Documentation

◆ type

template<typename T>
typedef T fastuidraw::range_type< T >::type

Typedef to identify template argument type

Definition at line 398 of file util.hpp.

Constructor & Destructor Documentation

◆ range_type() [1/2]

template<typename T>
fastuidraw::range_type< T >::range_type ( b,
e 
)
inline

Ctor.

Parameters
bvalue with which to initialize m_begin
evalue with which to initialize m_end

Definition at line 415 of file util.hpp.

◆ range_type() [2/2]

template<typename T>
fastuidraw::range_type< T >::range_type ( void  )
inline

Empty ctor, m_begin and m_end are uninitialized.

Definition at line 423 of file util.hpp.

Member Function Documentation

◆ difference()

template<typename T>
template<typename W = T>
W fastuidraw::range_type< T >::difference ( void  ) const
inline

Provided as a conveniance, equivalent to

Definition at line 434 of file util.hpp.

◆ operator+=()

template<typename T>
template<typename W >
void fastuidraw::range_type< T >::operator+= ( const W &  v)
inline

Increment both m_begin and m_end.

Parameters
vvalue by which to increment

Definition at line 445 of file util.hpp.

◆ operator-=()

template<typename T>
template<typename W >
void fastuidraw::range_type< T >::operator-= ( const W &  v)
inline

Decrement both m_begin and m_end.

Parameters
vvalue by which to decrement

Definition at line 457 of file util.hpp.

◆ sanitize()

template<typename T>
void fastuidraw::range_type< T >::sanitize ( void  )
inline

Make sure that m_begin is no more than m_end, requires that the type T supports comparison < operator and assignment = operator.

Definition at line 469 of file util.hpp.

Member Data Documentation

◆ m_begin

template<typename T>
type fastuidraw::range_type< T >::m_begin

Iterator to first element

Definition at line 403 of file util.hpp.

◆ m_end

template<typename T>
type fastuidraw::range_type< T >::m_end

iterator to one past the last element

Definition at line 408 of file util.hpp.


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