Audio Processing Framework (APF) version 0.5.0
Classes | Namespaces | Macros | Functions
iterator.h File Reference

Several more or less useful iterators and some macros. More...

#include <cassert>
#include <iterator>
#include <type_traits>
#include "apf/math.h"

Go to the source code of this file.

Classes

class  apf::has_begin_and_end< I >
 Convenience class providing begin() and end(). More...
 
class  apf::iterator_proxy< I, Container >
 Helper class for apf::cast_proxy and apf::transform_proxy. More...
 
class  apf::iterator_proxy_const< I, Container >
 Helper class for cast_proxy_const and transform_proxy_const. More...
 
class  apf::accumulating_iterator< I >
 An output iterator which adds on assignment. More...
 
class  apf::accumulating_iterator< I >::output_proxy
 Helper class. More...
 
class  apf::cast_iterator< T, I >
 Iterator that casts items to T* on dereferenciation. More...
 
struct  apf::cast_proxy< T, Container >
 Encapsulate a container of base pointers. More...
 
struct  apf::cast_proxy_const< T, Container >
 Encapsulate a container of base pointers (const version). More...
 
class  apf::circular_iterator< I >
 Circular iterator class. More...
 
class  apf::transform_iterator< I, F >
 Iterator adaptor with a function call at dereferenciation. More...
 
struct  apf::transform_proxy< F, Container >
 Wrap a container and provide a transform_iterator instead of the normal one. More...
 
struct  apf::transform_proxy_const< F, Container >
 Wrap a container and provide a transform_iterator (const version). More...
 
class  apf::index_iterator< T >
 Iterator with a built-in number. More...
 
class  apf::stride_iterator< I >
 A stride iterator. More...
 
class  apf::dual_iterator< I1, I2 >
 Iterate over two iterators at once. More...
 
class  apf::dual_iterator< I1, I2 >::output_proxy
 Helper class for dual_iterator. More...
 
class  apf::discard_iterator
 An iterator which does nothing. More...
 
struct  apf::discard_iterator::output_proxy
 Helper class for discard_iterator. More...
 

Namespaces

namespace  apf
 Audio Processing Framework.
 

Macros

#define APF_ITERATOR_CONSTRUCTORS(iterator_name, base_iterator_type, base_member)
 Straightforward default constructor and constructor from base iterator. More...
 
#define APF_ITERATOR_BASE(base_iterator_type, base_member)
 Get the base iterator. More...
 
#define APF_ITERATOR_OUTPUT_DEREFERENCE(base_member)
 Straightforward dereference operator. More...
 
#define APF_ITERATOR_OUTPUT_PREINCREMENT(base_member)
 Straightforward preincrement operator. More...
 
#define APF_ITERATOR_OUTPUT_POSTINCREMENT
 Postincrement operator (using preincrement operator). More...
 
#define APF_ITERATOR_INPUT_DEREFERENCE   APF_ITERATOR_OUTPUT_DEREFERENCE
 Straightforward dereference operator. More...
 
#define APF_ITERATOR_INPUT_ARROW(base_member)
 Straightforward arrow operator. More...
 
#define APF_ITERATOR_INPUT_EQUAL(base_member)
 Straightforward equality operator. More...
 
#define APF_ITERATOR_INPUT_PREINCREMENT   APF_ITERATOR_OUTPUT_PREINCREMENT
 Straightforward preincrement operator. More...
 
#define APF_ITERATOR_INPUT_POSTINCREMENT   APF_ITERATOR_OUTPUT_POSTINCREMENT
 Postincrement operator (using preincrement operator). More...
 
#define APF_ITERATOR_INPUT_UNEQUAL
 Unequality operator (using equality operator) More...
 
#define APF_ITERATOR_FORWARD_EQUAL   APF_ITERATOR_INPUT_EQUAL
 Straightforward equality operator. More...
 
#define APF_ITERATOR_FORWARD_DEREFERENCE   APF_ITERATOR_INPUT_DEREFERENCE
 Straightforward dereference operator. More...
 
#define APF_ITERATOR_FORWARD_ARROW   APF_ITERATOR_INPUT_ARROW
 Straightforward arrow operator. More...
 
#define APF_ITERATOR_FORWARD_PREINCREMENT   APF_ITERATOR_INPUT_PREINCREMENT
 Straightforward preincrement operator. More...
 
#define APF_ITERATOR_FORWARD_POSTINCREMENT   APF_ITERATOR_INPUT_POSTINCREMENT
 Postincrement operator (using preincrement operator). More...
 
#define APF_ITERATOR_FORWARD_UNEQUAL   APF_ITERATOR_INPUT_UNEQUAL
 Unequality operator (using equality operator). More...
 
#define APF_ITERATOR_BIDIRECTIONAL_EQUAL   APF_ITERATOR_FORWARD_EQUAL
 Straightforward equality operator. More...
 
#define APF_ITERATOR_BIDIRECTIONAL_DEREFERENCE   APF_ITERATOR_FORWARD_DEREFERENCE
 Straightforward dereference operator. More...
 
#define APF_ITERATOR_BIDIRECTIONAL_ARROW   APF_ITERATOR_FORWARD_ARROW
 Straightforward arrow operator. More...
 
#define APF_ITERATOR_BIDIRECTIONAL_PREINCREMENT   APF_ITERATOR_FORWARD_PREINCREMENT
 Straightforward preincrement operator. More...
 
#define APF_ITERATOR_BIDIRECTIONAL_PREDECREMENT(base_member)
 Straightforward predecrement operator. More...
 
#define APF_ITERATOR_BIDIRECTIONAL_POSTINCREMENT   APF_ITERATOR_FORWARD_POSTINCREMENT
 Postincrement operator (using preincrement operator). More...
 
#define APF_ITERATOR_BIDIRECTIONAL_UNEQUAL   APF_ITERATOR_FORWARD_UNEQUAL
 Unequality operator (using equality operator). More...
 
#define APF_ITERATOR_BIDIRECTIONAL_POSTDECREMENT
 Postdecrement operator (using predecrement operator). More...
 
#define APF_ITERATOR_RANDOMACCESS_EQUAL   APF_ITERATOR_BIDIRECTIONAL_EQUAL
 Straightforward equality operator. More...
 
#define APF_ITERATOR_RANDOMACCESS_DEREFERENCE   APF_ITERATOR_BIDIRECTIONAL_DEREFERENCE
 Straightforward dereference operator. More...
 
#define APF_ITERATOR_RANDOMACCESS_ARROW   APF_ITERATOR_BIDIRECTIONAL_ARROW
 Straightforward arrow operator. More...
 
#define APF_ITERATOR_RANDOMACCESS_PREINCREMENT   APF_ITERATOR_BIDIRECTIONAL_PREINCREMENT
 Straightforward preincrement operator. More...
 
#define APF_ITERATOR_RANDOMACCESS_PREDECREMENT   APF_ITERATOR_BIDIRECTIONAL_PREDECREMENT
 Straightforward predecrement operator. More...
 
#define APF_ITERATOR_RANDOMACCESS_ADDITION_ASSIGNMENT(base_member)
 Straightforward addition/assignment operator. More...
 
#define APF_ITERATOR_RANDOMACCESS_DIFFERENCE(base_member)
 Straightforward difference operator. More...
 
#define APF_ITERATOR_RANDOMACCESS_SUBSCRIPT
 Straightforward subscript operator (using + and dereference operator). More...
 
#define APF_ITERATOR_RANDOMACCESS_LESS(base_member)
 Straightforward less-than operator. More...
 
#define APF_ITERATOR_RANDOMACCESS_UNEQUAL   APF_ITERATOR_BIDIRECTIONAL_UNEQUAL
 Unequality operator (using equality operator). More...
 
#define APF_ITERATOR_RANDOMACCESS_OTHER_COMPARISONS
 Other comparisons (>, <=, >=). More...
 
#define APF_ITERATOR_RANDOMACCESS_POSTINCREMENT   APF_ITERATOR_BIDIRECTIONAL_POSTINCREMENT
 Postincrement operator (using preincrement operator). More...
 
#define APF_ITERATOR_RANDOMACCESS_POSTDECREMENT   APF_ITERATOR_BIDIRECTIONAL_POSTDECREMENT
 Postdecrement operator (using predecrement operator) More...
 
#define APF_ITERATOR_RANDOMACCESS_THE_REST
 The rest of the random access iterator requirements. More...
 

Functions

template<typename T >
bool apf::no_nullptr (T *in)
 Check for null-pointer. More...
 
template<typename T >
bool apf::no_nullptr (T &)
 Dummy overload for non-pointers. More...
 
template<typename I , typename... Args>
has_begin_and_end< I > apf::make_begin_and_end (I first, Args &&... args)
 
template<typename I >
accumulating_iterator< I > apf::make_accumulating_iterator (I base_iterator)
 Helper function to create an accumulating_iterator. More...
 
template<typename T , typename I >
cast_iterator< T, I > apf::make_cast_iterator (I base_iterator)
 Helper function to create a cast_iterator. More...
 
template<typename T , typename Container >
cast_proxy< T, Container > apf::make_cast_proxy (Container &l)
 Helper function to create a cast_proxy. More...
 
template<typename T , typename Container >
cast_proxy_const< T, Container > apf::make_cast_proxy_const (Container &l)
 Helper function to create a cast_proxy_const. More...
 
template<typename I >
circular_iterator< I > apf::make_circular_iterator (I begin, I end)
 Helper function to create a circular_iterator. More...
 
template<typename I >
circular_iterator< I > apf::make_circular_iterator (I begin, I end, I current)
 Helper function to create a circular_iterator. More...
 
template<typename I , typename F >
transform_iterator< I, F > apf::make_transform_iterator (I base_iterator, F f)
 Helper function to create a transform_iterator. More...
 
template<typename T >
index_iterator< T > apf::make_index_iterator (T start)
 Helper function to create an index_iterator. More...
 
template<typename I1 , typename I2 >
dual_iterator< I1, I2 > apf::make_dual_iterator (I1 i1, I2 i2)
 Helper function to create an dual_iterator. More...
 

Detailed Description

Several more or less useful iterators and some macros.

Definition in file iterator.h.