LocalGuidance
A library that generates velocity references to follow a path.
std_utils::CompileTimeSet< Type_ > Class Template Reference

Defines the compile time set (cts) that contains Type_ as a variadic template. More...

#include <CompileTimeSet.hpp>

Public Types

using Type = Type_
 Expose Type. More...
 

Static Public Member Functions

template<template< Type_ > class F, class... Args>
static constexpr bool forEach (Args &&...args)
 Default implementation of forEach(). More...
 
static constexpr bool forEach (std::function< bool(const Type_ &)> f)
 Default implementation of forEach(). More...
 
static constexpr bool contains (const Type_)
 Default implementation of contains(). More...
 
static constexpr bool containsRange (const Type_ begin, const Type_ end)
 Default implementation of containsRange(). More...
 
static constexpr std::size_t size ()
 Default implementation of size(). More...
 

Static Private Member Functions

template<template< Type_ > class F, class... Args>
static constexpr bool forEachRangePreBegin (Type_ begin, Type_ end, Args &&...args)
 Implementation helper for functor based forEachRange. More...
 
static constexpr bool forEachRangePreBegin (Type_ begin, Type_ end, std::function< bool(const Type_ &)> f)
 Implementation helper for std::function based forEachRange. More...
 
template<template< Type_ > class F, class... Args>
static constexpr bool forEachRangePostBegin (Type_ begin, Type_ end, Args &&...args)
 Implementation helper for functor based forEachRange. More...
 
static constexpr bool forEachRangePostBegin (Type_ begin, Type_ end, std::function< bool(const Type_ &)> f)
 Implementation helper for std::function based forEachRange. More...
 
static constexpr bool containsRangePostBegin (const Type_ begin, const Type_ end)
 Implementation helper for containsRange(). More...
 
static constexpr bool unique (const Type_)
 Default implementation of the unique(). More...
 

Friends

template<typename T_ , T_... Args>
class CompileTimeSet
 Allow private access on all template specializations of CompileTimeSet. More...
 

Detailed Description

template<typename Type_>
class std_utils::CompileTimeSet< Type_ >

Defines the compile time set (cts) that contains Type_ as a variadic template.

Template Parameters
Type_Defines the type contained in the set.
REST_parameter pack of the cts.

Member Typedef Documentation

template<typename Type_ >
using std_utils::CompileTimeSet< Type_ >::Type = Type_

Expose Type.

Member Function Documentation

template<typename Type_ >
static constexpr bool std_utils::CompileTimeSet< Type_ >::contains ( const Type_  )
inlinestatic

Default implementation of contains().

Parameters
typetype at which cts is evaluated.
Returns
false
template<typename Type_ >
static constexpr bool std_utils::CompileTimeSet< Type_ >::containsRange ( const Type_  begin,
const Type_  end 
)
inlinestatic

Default implementation of containsRange().

Parameters
beginfirst type of range.
endlast type of range.
Returns
false.
template<typename Type_ >
static constexpr bool std_utils::CompileTimeSet< Type_ >::containsRangePostBegin ( const Type_  begin,
const Type_  end 
)
inlinestaticprivate

Implementation helper for containsRange().

Parameters
beginfirst type of range.
endlast type of range.
Returns
false.
template<typename Type_ >
template<template< Type_ > class F, class... Args>
static constexpr bool std_utils::CompileTimeSet< Type_ >::forEach ( Args &&...  args)
inlinestatic

Default implementation of forEach().

Template Parameters
FFunctor type that is templated on Type implements operator()(Args...).
ArgsVariadic template use for function arguments.
Parameters
argsParameter pack passes to the functor.
Returns
true.
template<typename Type_ >
static constexpr bool std_utils::CompileTimeSet< Type_ >::forEach ( std::function< bool(const Type_ &)>  f)
inlinestatic

Default implementation of forEach().

Parameters
ffunction object to call.
Returns
true.
template<typename Type_ >
template<template< Type_ > class F, class... Args>
static constexpr bool std_utils::CompileTimeSet< Type_ >::forEachRangePostBegin ( Type_  begin,
Type_  end,
Args &&...  args 
)
inlinestaticprivate

Implementation helper for functor based forEachRange.

Template Parameters
FFunctor type that is templated on Type implements operator()(Args...).
ArgsVariadic template use for function arguments.
Parameters
beginfirst type of range.
endlast type of range.
argsParameter pack passes to the functor.
Returns
false.
template<typename Type_ >
static constexpr bool std_utils::CompileTimeSet< Type_ >::forEachRangePostBegin ( Type_  begin,
Type_  end,
std::function< bool(const Type_ &)>  f 
)
inlinestaticprivate

Implementation helper for std::function based forEachRange.

Parameters
beginfirst type of range.
endlast type of range.
ffunction object to call.
Returns
false.
template<typename Type_ >
template<template< Type_ > class F, class... Args>
static constexpr bool std_utils::CompileTimeSet< Type_ >::forEachRangePreBegin ( Type_  begin,
Type_  end,
Args &&...  args 
)
inlinestaticprivate

Implementation helper for functor based forEachRange.

Template Parameters
FFunctor type that is templated on Type implements operator()(Args...).
ArgsVariadic template use for function arguments.
Parameters
beginfirst type of range.
endlast type of range.
argsParameter pack passes to the functor.
Returns
false.
template<typename Type_ >
static constexpr bool std_utils::CompileTimeSet< Type_ >::forEachRangePreBegin ( Type_  begin,
Type_  end,
std::function< bool(const Type_ &)>  f 
)
inlinestaticprivate

Implementation helper for std::function based forEachRange.

Parameters
beginfirst type of range.
endlast type of range.
ffunction object to call.
Returns
false.
template<typename Type_ >
static constexpr std::size_t std_utils::CompileTimeSet< Type_ >::size ( )
inlinestatic

Default implementation of size().

Returns
0.
template<typename Type_ >
static constexpr bool std_utils::CompileTimeSet< Type_ >::unique ( const Type_  )
inlinestaticprivate

Default implementation of the unique().

Parameters
Type_type which is tested for uniqueness.
Returns
true.

Friends And Related Function Documentation

template<typename Type_ >
template<typename T_ , T_... Args>
friend class CompileTimeSet
friend

Allow private access on all template specializations of CompileTimeSet.


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