Vcsn  2.0
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
vcsn::container_filter_range< C > Struct Template Reference

#include <crange.hh>

Collaboration diagram for vcsn::container_filter_range< C >:

Public Types

using unref_C = typename std::remove_reference< C >::type
 
using value_type = typename unref_C::value_type
 
using predicate_t = std::function< bool(value_type)>
 
using const_iterator = boost::filter_iterator< predicate_t, typename unref_C::const_iterator >
 

Public Member Functions

 container_filter_range (const unref_C &cont, predicate_t predicate)
 
const_iterator begin () const
 
const_iterator end () const
 
value_type front () const
 The first element. More...
 
value_type back () const
 The last element. More...
 
bool empty () const
 
size_t size () const
 

Private Attributes

const C cont_
 
predicate_t predicate_
 

Detailed Description

template<typename C>
struct vcsn::container_filter_range< C >

Definition at line 48 of file crange.hh.

Member Typedef Documentation

template<typename C >
using vcsn::container_filter_range< C >::const_iterator = boost::filter_iterator<predicate_t, typename unref_C::const_iterator>

Definition at line 55 of file crange.hh.

template<typename C >
using vcsn::container_filter_range< C >::predicate_t = std::function<bool(value_type)>

Definition at line 53 of file crange.hh.

template<typename C >
using vcsn::container_filter_range< C >::unref_C = typename std::remove_reference<C>::type

Definition at line 51 of file crange.hh.

template<typename C >
using vcsn::container_filter_range< C >::value_type = typename unref_C::value_type

Definition at line 52 of file crange.hh.

Constructor & Destructor Documentation

template<typename C >
vcsn::container_filter_range< C >::container_filter_range ( const unref_C cont,
predicate_t  predicate 
)
inline

Definition at line 57 of file crange.hh.

Member Function Documentation

template<typename C >
value_type vcsn::container_filter_range< C >::back ( ) const
inline

The last element.

Precondition
!empty().
Note
: we don't return by reference, as begin returns a temporary.

Definition at line 86 of file crange.hh.

References vcsn::container_filter_range< C >::cont_, and vcsn::container_filter_range< C >::empty().

Here is the call graph for this function:

template<typename C >
bool vcsn::container_filter_range< C >::empty ( ) const
inline

Definition at line 92 of file crange.hh.

References vcsn::container_filter_range< C >::begin(), and vcsn::container_filter_range< C >::end().

Referenced by vcsn::container_filter_range< C >::back(), and vcsn::container_filter_range< C >::front().

Here is the call graph for this function:

template<typename C >
value_type vcsn::container_filter_range< C >::front ( ) const
inline

The first element.

Precondition
!empty().
Note
: we don't return by reference, as begin returns a temporary.

Definition at line 76 of file crange.hh.

References vcsn::container_filter_range< C >::begin(), and vcsn::container_filter_range< C >::empty().

Here is the call graph for this function:

template<typename C >
size_t vcsn::container_filter_range< C >::size ( ) const
inline

Definition at line 97 of file crange.hh.

References vcsn::container_filter_range< C >::begin(), and vcsn::container_filter_range< C >::end().

Referenced by vcsn::detail::filter_automaton_impl< Aut >::num_all_states(), and vcsn::detail::filter_automaton_impl< Aut >::num_states().

Here is the call graph for this function:

Member Data Documentation

template<typename C >
predicate_t vcsn::container_filter_range< C >::predicate_
private

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