CppUnit project page | CppUnit home page |
#include <cpptl/typetraits.h>
#include <stdexcept>
Go to the source code of this file.
Namespaces | |
namespace | CppTL |
namespace | CppTL::Enum |
Classes | |
struct | CppTL::STLIteratorTraits< IteratorType > |
struct | CppTL::STLIteratorTraits< ValueType * > |
class | CppTL::StopEnumerationError |
class | CppTL::EnumeratorBase |
class | CppTL::TypeEnumeratorBase< EnumValueType > |
class | CppTL::EmptyEnumerator< ValueType > |
class | CppTL::ForwardItEnumeratorBase< ForwardItType, ForwardItValueType > |
class | CppTL::ForwardItEnumerator< ForwardItType, ForwardItValueType > |
class | CppTL::TransformForwardItEnumerator< ForwardItType, TransformFn > |
class | CppTL::ContainerEnumerator< STLContainerType, ValueType > |
class | CppTL::TransformEnumerator< Adaptor, AdaptedEnumeratorType > |
class | CppTL::MapKeysEnumerator< MapIteratorType, ValueType > |
class | CppTL::MapValuesEnumerator< MapIteratorType, ValueType > |
class | CppTL::FilterEnumerator< FilteredEnumerator, FilterPredicate > |
class | CppTL::SliceEnumerator< EnumeratorType > |
class | CppTL::AnyEnumeratorBase< ValueType > |
class | CppTL::AnyEnumeratorImpl< EnumeratorType, ValueType > |
class | CppTL::AnyEnumerator< ValueType > |
class | CppTL::SugarEnumerator< ThinEnumeratorType, ValueType > |
class | CppTL::AddressOfAdaptor< ValueType > |
Defines | |
#define | CPPTL_ENUMERATOR_CHECK_CURRENT |
#define | CPPTL_ENUMERATOR_CHECK_ADVANCE |
#define | CPPTL_IMPL_ENUMERATOR |
Implements all sugar functions for enumerator. | |
Functions | |
template<class EnumeratorType> | |
void | CppTL::assertEnumeratorHasNext (const EnumeratorType &enumerator) |
template<class ForwardItType> | |
ForwardItEnumerator < ForwardItType > | CppTL::Enum::range (ForwardItType begin, ForwardItType end) |
template<class ForwardItType, class ValueType> | |
ForwardItEnumerator < ForwardItType, typename ValueType::type > | CppTL::Enum::range (ForwardItType begin, ForwardItType end, ValueType) |
template<class ForwardItType, class Adaptor> | |
TransformForwardItEnumerator < ForwardItType, Adaptor > | CppTL::Enum::rangeTransform (ForwardItType begin, ForwardItType end, Adaptor adaptor) |
template<class ContainerType> | |
ContainerEnumerator < ContainerType > | CppTL::Enum::container (const ContainerType &enumeratedContainer) |
template<class ContainerType, class ValueType> | |
ContainerEnumerator < ContainerType, typename ValueType::type > | CppTL::Enum::container (const ContainerType &enumeratedContainer, ValueType) |
template<class ForwardItType> | |
MapKeysEnumerator< ForwardItType > | CppTL::Enum::keysRange (ForwardItType begin, ForwardItType end) |
template<class ForwardItType, class ValueType> | |
MapKeysEnumerator < ForwardItType, typename ValueType::type > | CppTL::Enum::keysRange (ForwardItType begin, ForwardItType end, ValueType) |
template<class ContainerType> | |
MapKeysEnumerator< typename ContainerType::const_iterator, typename RemoveConst< typename ContainerType::value_type::first_type > ::type > | CppTL::Enum::keys (const ContainerType &container) |
template<class ContainerType, class ValueType> | |
MapKeysEnumerator< typename ContainerType::const_iterator, typename ValueType::type > | CppTL::Enum::keys (const ContainerType &container, ValueType) |
template<class ContainerType> | |
MapValuesEnumerator< typename ContainerType::const_iterator, typename RemoveConst< typename ContainerType::value_type::second_type > ::type > | CppTL::Enum::values (const ContainerType &container) |
template<class ContainerType, class ValueType> | |
MapValuesEnumerator< typename ContainerType::const_iterator, typename ValueType::type > | CppTL::Enum::values (const ContainerType &container, ValueType) |
template<class ForwardItType> | |
MapValuesEnumerator < ForwardItType > | CppTL::Enum::valuesRange (ForwardItType begin, ForwardItType end) |
template<class ForwardItType, class ValueType> | |
MapValuesEnumerator < ForwardItType, typename ValueType::type > | CppTL::Enum::valuesRange (ForwardItType begin, ForwardItType end, ValueType) |
template<class EnumeratorType> | |
AnyEnumerator< typename EnumeratorType::value_type > | CppTL::Enum::any (const EnumeratorType &enumerator) |
template<class EnumeratorType, class Adaptor> | |
TransformEnumerator< Adaptor, EnumeratorType > | CppTL::Enum::transform (const EnumeratorType &enumerator, Adaptor adaptor) |
template<class EnumeratorType> | |
TransformEnumerator < AddressOfAdaptor< typename EnumeratorType::value_type > , EnumeratorType > | CppTL::Enum::addressOfTransform (const EnumeratorType &enumerator) |
template<class EnumeratorType, class Predicate> | |
FilterEnumerator < EnumeratorType, Predicate > | CppTL::Enum::filter (const EnumeratorType &enumerator, Predicate predicate) |
template<class EnumeratorType> | |
SliceEnumerator< EnumeratorType > | CppTL::Enum::slice (const EnumeratorType &enumerator, unsigned int beginIndex, unsigned int endIndex=-1) |
template<class ThinEnumeratorType> | |
SugarEnumerator < ThinEnumeratorType > | CppTL::Enum::sugar (const ThinEnumeratorType &e) |
Implements full Enumerator interface for an enumerator providing only is_open(), current() and advance(). | |
template<class ForwardItType> | |
AnyEnumerator< typename RemoveConst< typename ForwardItType::value_type > ::type > | CppTL::Enum::anyRange (ForwardItType begin, ForwardItType end) |
template<class ForwardItType, class ValueType> | |
AnyEnumerator< typename ValueType::type > | CppTL::Enum::anyRange (ForwardItType begin, ForwardItType end, ValueType type) |
template<class ForwardItType, class Adaptor> | |
AnyEnumerator< typename Adaptor::result_type > | CppTL::Enum::anyRangeTransform (ForwardItType begin, ForwardItType end, Adaptor adaptor) |
template<class ContainerType> | |
AnyEnumerator< typename RemoveConst< typename ContainerType::value_type > ::type > | CppTL::Enum::anyContainer (const ContainerType &enumeratedContainer) |
template<class ContainerType, class ValueType> | |
AnyEnumerator< typename ValueType::type > | CppTL::Enum::anyContainer (const ContainerType &enumeratedContainer, ValueType type) |
template<class ForwardItType> | |
AnyEnumerator< typename RemoveConst< typename ForwardItType::value_type::first_type > ::type > | CppTL::Enum::anyKeysRange (ForwardItType begin, ForwardItType end) |
template<class ForwardItType, class ValueType> | |
AnyEnumerator< typename ValueType::type > | CppTL::Enum::anyKeysRange (ForwardItType begin, ForwardItType end, ValueType type) |
template<class ContainerType, class ValueType> | |
AnyEnumerator< typename ValueType::type > | CppTL::Enum::anyKeys (const ContainerType &container, ValueType type) |
template<class ContainerType> | |
AnyEnumerator< typename RemoveConst< typename ContainerType::value_type::first_type > ::type > | CppTL::Enum::anyKeys (const ContainerType &container) |
template<class ForwardItType> | |
AnyEnumerator< typename RemoveConst< typename ForwardItType::value_type::second_type > ::type > | CppTL::Enum::anyValuesRange (ForwardItType begin, ForwardItType end) |
template<class ForwardItType, class ValueType> | |
AnyEnumerator< typename ValueType::type > | CppTL::Enum::anyValuesRange (ForwardItType begin, ForwardItType end, ValueType type) |
template<class ContainerType> | |
AnyEnumerator< typename RemoveConst< typename ContainerType::value_type::second_type > ::type > | CppTL::Enum::anyValues (const ContainerType &container) |
template<class ContainerType, class ValueType> | |
AnyEnumerator< typename ValueType::type > | CppTL::Enum::anyValues (const ContainerType &container, ValueType type) |
template<class EnumeratorType, class Adaptor> | |
AnyEnumerator< typename Adaptor::result_type > | CppTL::Enum::anyTransform (const EnumeratorType &enumerator, Adaptor adaptor) |
template<class EnumeratorType> | |
AnyEnumerator< typename EnumeratorType::value_type * > | CppTL::Enum::anyAddressOfTransform (const EnumeratorType &enumerator) |
template<class EnumeratorType, class Predicate> | |
AnyEnumerator< typename EnumeratorType::value_type > | CppTL::Enum::anyFilter (const EnumeratorType &enumerator, Predicate predicate) |
template<class EnumeratorType> | |
AnyEnumerator< typename EnumeratorType::value_type > | CppTL::Enum::anySlice (const EnumeratorType &enumerator, unsigned int beginIndex, unsigned int endIndex=-1) |
template<class ThinEnumeratorType> | |
AnyEnumerator< typename ThinEnumeratorType::value_type > | CppTL::Enum::anySugar (const ThinEnumeratorType &e) |
#define CPPTL_ENUMERATOR_CHECK_ADVANCE |
Value:
CPPTL_ASSERT_MESSAGE( is_open(), \ "Attempt to advance enumerator past its end." )
Referenced by CppTL::SugarEnumerator< ThinEnumeratorType, ValueType >::advance(), CppTL::SliceEnumerator< EnumeratorType >::advance(), CppTL::FilterEnumerator< FilteredEnumerator, FilterPredicate >::advance(), CppTL::MapValuesEnumerator< MapIteratorType, ValueType >::advance(), CppTL::MapKeysEnumerator< MapIteratorType, ValueType >::advance(), CppTL::TransformForwardItEnumerator< ForwardItType, TransformFn >::advance(), CppTL::ForwardItEnumerator< STLContainerType::const_iterator, CppTL::ValueType >::advance(), and CppTL::EmptyEnumerator< ValueType >::advance().
#define CPPTL_ENUMERATOR_CHECK_CURRENT |
Value:
CPPTL_ASSERT_MESSAGE( is_open(), \ "Attempt to access current element on closed enumerator." )
Referenced by CppTL::SugarEnumerator< ThinEnumeratorType, ValueType >::current(), CppTL::SliceEnumerator< EnumeratorType >::current(), CppTL::FilterEnumerator< FilteredEnumerator, FilterPredicate >::current(), CppTL::MapValuesEnumerator< MapIteratorType, ValueType >::current(), CppTL::MapKeysEnumerator< MapIteratorType, ValueType >::current(), CppTL::TransformForwardItEnumerator< ForwardItType, TransformFn >::current(), CppTL::ForwardItEnumerator< STLContainerType::const_iterator, CppTL::ValueType >::current(), and CppTL::EmptyEnumerator< ValueType >::current().
#define CPPTL_IMPL_ENUMERATOR |
Value:
bool hasNext() const \ { \ return is_open(); \ } \ \ value_type next() \ { \ value_type value = current(); \ advance(); \ return value; \ } \ \ value_type operator *() const \ { \ return current(); \ } \ \ self_type &operator ++() \ { \ return advance(); \ } \ \ self_type operator ++( int ) \ { \ self_type old = *this; \ advance(); \ return old; \ }
The following functions must be implemented in DerivedType:
bool is_open() const; EnumValueType current() const; DerivedType advance();
hosts this site. |
Send comments to: CppUnit Developers |