Empirical
Classes | Public Types | Public Member Functions | Protected Types | List of all members
emp::tools::Attrs< T > Class Template Reference

#include <attrs.h>

Inheritance diagram for emp::tools::Attrs< T >:
emp::tools::__attrs_impl::AttrsParent< T... >

Public Types

using attributes_t = Attrs
 
using pack_t = TypePack< T... >
 

Public Member Functions

constexpr Attrs ()
 
template<typename F >
Attrsoperator= (F &&from)
 
template<class... U>
constexpr auto operator() (U &&...args)&
 
template<class... U>
constexpr auto operator() (U &&...args) const &
 
template<class... U>
constexpr auto operator() (U &&...args)&&
 
template<class... U>
constexpr auto operator() (U &&...args) const &&
 
template<class... U>
constexpr bool operator== (const Attrs< U... > &other) const
 
template<typename I , typename F >
constexpr auto AttributeReduce (I &&init, F &&callback)&
 
template<typename I , typename F >
constexpr auto AttributeReduce (I &&init, F &&callback) const &
 
template<typename I , typename F >
constexpr auto AttributeReduce (I &&init, F &&callback)&&
 
template<typename I , typename F >
constexpr auto AttributeReduce (I &&init, F &&callback) const &&
 
template<typename I , typename F >
constexpr auto Reduce (I &&init, F &&callback)
 
template<typename I , typename F >
constexpr auto Reduce (I &&init, F &&callback) const
 
template<typename F >
constexpr void AttributeForeach (F &&callback)&
 
template<typename F >
constexpr void AttributeForeach (F &&callback) const &
 
template<typename F >
constexpr void AttributeForeach (F &&callback)&&
 
template<typename F >
constexpr void AttributeForeach (F &&callback) const &&
 
template<typename F >
constexpr void Foreach (F &&callback)
 
template<typename F >
constexpr void Foreach (F &&callback) const
 
template<typename U >
constexpr auto SetAttribute (U &&attribute)&
 
template<typename U >
constexpr auto SetAttribute (U &&attribute) const &
 
template<typename U >
constexpr auto SetAttribute (U &&attribute)&&
 
template<typename U >
constexpr auto SetAttribute (U &&attribute) const &&
 

Protected Types

using constructor_detector = typename __attrs_impl_constructor_detector< U >::type
 

Member Typedef Documentation

template<typename... T>
using emp::tools::Attrs< T >::attributes_t = Attrs
using emp::tools::__attrs_impl::AttrsParent< T >::constructor_detector = typename __attrs_impl_constructor_detector<U>::type
protectedinherited
template<typename... T>
using emp::tools::Attrs< T >::pack_t = TypePack<T...>

Constructor & Destructor Documentation

template<typename... T>
constexpr emp::tools::Attrs< T >::Attrs ( )
inline

Member Function Documentation

template<typename... T>
template<typename F >
constexpr void emp::tools::Attrs< T >::AttributeForeach ( F &&  callback)
inline
template<typename... T>
template<typename F >
constexpr void emp::tools::Attrs< T >::AttributeForeach ( F &&  callback) const
inline
template<typename... T>
template<typename F >
constexpr void emp::tools::Attrs< T >::AttributeForeach ( F &&  callback)
inline
template<typename... T>
template<typename F >
constexpr void emp::tools::Attrs< T >::AttributeForeach ( F &&  callback) const
inline
template<typename... T>
template<typename I , typename F >
constexpr auto emp::tools::Attrs< T >::AttributeReduce ( I &&  init,
F &&  callback 
)
inline
template<typename... T>
template<typename I , typename F >
constexpr auto emp::tools::Attrs< T >::AttributeReduce ( I &&  init,
F &&  callback 
) const
inline
template<typename... T>
template<typename I , typename F >
constexpr auto emp::tools::Attrs< T >::AttributeReduce ( I &&  init,
F &&  callback 
)
inline
template<typename... T>
template<typename I , typename F >
constexpr auto emp::tools::Attrs< T >::AttributeReduce ( I &&  init,
F &&  callback 
) const
inline
template<typename... T>
template<typename F >
constexpr void emp::tools::Attrs< T >::Foreach ( F &&  callback)
inline
template<typename... T>
template<typename F >
constexpr void emp::tools::Attrs< T >::Foreach ( F &&  callback) const
inline
template<typename... T>
template<class... U>
constexpr auto emp::tools::Attrs< T >::operator() ( U &&...  args)
inline

Provide a call operator for attribute packs. This will attempt to call each member of the attribute pack with the given arguments, and maps the result of that call into a new parameter pack as the same attribute. If one of the members of the pack cannot be called with the given pack, then it is put into the new pack unchanged. Mostly, this is meant to allow the opengl plotting library to do mapping operations

template<typename... T>
template<class... U>
constexpr auto emp::tools::Attrs< T >::operator() ( U &&...  args) const
inline
template<typename... T>
template<class... U>
constexpr auto emp::tools::Attrs< T >::operator() ( U &&...  args)
inline
template<typename... T>
template<class... U>
constexpr auto emp::tools::Attrs< T >::operator() ( U &&...  args) const
inline
template<typename... T>
template<typename F >
Attrs& emp::tools::Attrs< T >::operator= ( F &&  from)
inline
template<typename... T>
template<class... U>
constexpr bool emp::tools::Attrs< T >::operator== ( const Attrs< U... > &  other) const
inline

Attribute packs support equals and not equals, but are not orderable, as the members are not considered to be ordered from the user's perspective.

template<typename... T>
template<typename I , typename F >
constexpr auto emp::tools::Attrs< T >::Reduce ( I &&  init,
F &&  callback 
)
inline
template<typename... T>
template<typename I , typename F >
constexpr auto emp::tools::Attrs< T >::Reduce ( I &&  init,
F &&  callback 
) const
inline
template<typename... T>
template<typename U >
constexpr auto emp::tools::Attrs< T >::SetAttribute ( U &&  attribute)
inline
template<typename... T>
template<typename U >
constexpr auto emp::tools::Attrs< T >::SetAttribute ( U &&  attribute) const
inline
template<typename... T>
template<typename U >
constexpr auto emp::tools::Attrs< T >::SetAttribute ( U &&  attribute)
inline
template<typename... T>
template<typename U >
constexpr auto emp::tools::Attrs< T >::SetAttribute ( U &&  attribute) const
inline

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