ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::concept Namespace Reference

Namespaces

namespace  detail_aborter
 
namespace  detail_slc
 
namespace  Linearizer
 
namespace  Parameter
 
namespace  Stepper
 
namespace  VertexFinder
 
namespace  VertexFitter
 

Typedefs

template<template< class...> class Op, class... Args>
using is_detected = typename detail::detector< detail::nonesuch, void, Op, Args...>::value_t
 
template<template< class...> class Op, class... Args>
using detected_t = typename detail::detector< detail::nonesuch, void, Op, Args...>::type
 
template<class Expected , template< class...> class Op, class... Args>
using is_detected_exact = std::is_same< Expected, detected_t< Op, Args...>>
 
template<class To , template< class...> class Op, class... Args>
using is_detected_convertible = std::is_convertible< detected_t< Op, Args...>, To >
 
template<class Default , template< class...> class Op, class... Args>
using detected_or = detail::detector< Default, void, Op, Args...>
 

Variables

template<typename T , typename propagator_state_t , typename stepper_t >
constexpr bool abort_condition_signature_check_v
 Meta function for checking if an aborter has a valid interface.
 
template<bool... Bs>
constexpr bool require = std::conjunction<std::bool_constant<Bs>...>::value
 
template<bool... Bs>
constexpr bool either = std::disjunction<std::bool_constant<Bs>...>::value
 
template<bool... Bs>
constexpr bool disallow = not require<Bs...>
 
template<template< class...> class Op, class... Args>
constexpr bool exists = is_detected<Op, Args...>::value
 
template<class To , template< class...> class Op, class... Args>
constexpr bool converts_to = is_detected_convertible<To, Op, Args...>::value
 
template<class Exact , template< class...> class Op, class... Args>
constexpr bool identical_to = is_detected_exact<Exact, Op, Args...>::value
 
template<typename T , typename R , template< class...> class M, typename... Arguments>
constexpr bool has_method = M<T, R, Arguments...>::template tv<T>::value
 
template<typename T , template< class...> class M, typename V >
constexpr bool has_member = identical_to<V, M, T>
 

Detailed Description

The following operators have to be implemented in order to satisfy as an abort condition

clang-format off

IF the aborter declares an action_type upon whose result it will depend:

template <typename propagator_state_t, typename stepper_t,
typename result_t>
bool
operator()(propagator_state_t& state,
const stepper_t, const result_t& r) const
{
return false;
}

IF the aborter does NOT declare an action_type:

template <typename propagator_state_t, typename stepper_t>
bool
operator()(propagator_state_t& state, const stepper_t& stepper) const
{
return false;
}

clang-format off

Typedef Documentation

template<class Default , template< class...> class Op, class... Args>
using Acts::concept::detected_or = typedef detail::detector<Default, void, Op, Args...>

Helper which invokes the detector with a default type, and resolves to the type.

Template Parameters
DefaultThe type to resolve to if Op<Args...> does not resolve.
OpThe operation
ArgsThe argument to the operation

Definition at line 140 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 140 of file TypeTraits.hpp

template<template< class...> class Op, class... Args>
using Acts::concept::detected_t = typedef typename detail::detector<detail::nonesuch, void, Op, Args...>::type

This type calls into the detector (same as is_detected) but it extracts the return type of Op<Args...>.

Template Parameters
OpThe operation
ArgsThe arguments to the operation

Definition at line 108 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 108 of file TypeTraits.hpp

template<template< class...> class Op, class... Args>
using Acts::concept::is_detected = typedef typename detail::detector<detail::nonesuch, void, Op, Args...>::value_t

This type ties together the detection idiom. It instantiates the detector template with the Op and Args and resolves to the exact value type. In essence, if Op<Args...> succeeds, this will evaluate to std::true_type, and if not, it will evaluate to std::false_type.

Template Parameters
OpThe operation to test
ArgsThe arguments to the operation

Definition at line 98 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 98 of file TypeTraits.hpp

template<class To , template< class...> class Op, class... Args>
using Acts::concept::is_detected_convertible = typedef std::is_convertible<detected_t<Op, Args...>, To>

This evaluates Op inside the detector, and checks whether the resolved type is convertible to To.

Template Parameters
ToThe type to check convertibility to.
OpThe operation
ArgsThe arguments to the operation

Definition at line 130 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 130 of file TypeTraits.hpp

template<class Expected , template< class...> class Op, class... Args>
using Acts::concept::is_detected_exact = typedef std::is_same<Expected, detected_t<Op, Args...>>

This invokes detected_t, and checks whether its result matches Expected.

Template Parameters
ExpectedThe expected result of the operation.
OpThe operation
ArgsThe arguments to the operation

Definition at line 118 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 118 of file TypeTraits.hpp

Variable Documentation

template<typename T , typename propagator_state_t , typename stepper_t >
constexpr bool Acts::concept::abort_condition_signature_check_v
Initial value:

Meta function for checking if an aborter has a valid interface.

Definition at line 102 of file abort_condition_signature_check.hpp.

View newest version in sPHENIX GitHub at line 102 of file abort_condition_signature_check.hpp

Referenced by Acts::AbortList< PathLimitReached >::operator()().

template<class To , template< class...> class Op, class... Args>
constexpr bool Acts::concept::converts_to = is_detected_convertible<To, Op, Args...>::value

Alias to conversion check, which also extracts the constexpr boolean value.

Template Parameters
ToThe type to check convertibility to.
OpThe operation
ArgsThe arguments to the operation.

Definition at line 185 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 185 of file TypeTraits.hpp

Referenced by Acts::VoidMeasurementCalibrator::operator()().

template<bool... Bs>
constexpr bool Acts::concept::disallow = not require<Bs...>

Alias for the negation of a require. This is essentially a NOT ANY test.

Template Parameters
BsThe booleans.

Definition at line 168 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 168 of file TypeTraits.hpp

template<bool... Bs>
constexpr bool Acts::concept::either = std::disjunction<std::bool_constant<Bs>...>::value

Helper which forms the logical OR of its arguments. Converts to std::bool_constant.

Template Parameters
BsThe booleans to combine.

Definition at line 161 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 161 of file TypeTraits.hpp

template<template< class...> class Op, class... Args>
constexpr bool Acts::concept::exists = is_detected<Op, Args...>::value

Alias to is_detected which unpacks the constexpr boolean value.

Template Parameters
OpThe operation
ArgsThe arguments to the operation.

Definition at line 176 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 176 of file TypeTraits.hpp

Referenced by Fun4AllInputManager::AddListFile(), G4Tet::CalculateExtent(), FW::determineEventFilesRange(), FW::ensureWritableDirectory(), Acts::SurfaceArrayCreator::findKeySurfaces(), and HcalRawTowerBuilder::InitRun().

template<typename T , template< class...> class M, typename V >
constexpr bool Acts::concept::has_member = identical_to<V, M, T>

Helper to assert if a member of a given type exists. Basically only calls into identical_to but is nicer to read.

Template Parameters
TThe type to check existence of member on.
MThe member type trait
VThe type that the member is supposed to have.

Definition at line 217 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 217 of file TypeTraits.hpp

template<typename T , typename R , template< class...> class M, typename... Arguments>
constexpr bool Acts::concept::has_method = M<T, R, Arguments...>::template tv<T>::value

Helper which evaluates whether the type T has a method with a given signature.

Template Parameters
TThe type to check on. This can contain a const qualifier if you want to check on that.
RThe return type
MThe method trait, as generated by METHOD_TRAIT
ArgumentsThe argument types that make up the signature.

Definition at line 207 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 207 of file TypeTraits.hpp

Referenced by Acts::Propagator< stepper_t, navigator_t >::propagate().

template<class Exact , template< class...> class Op, class... Args>
constexpr bool Acts::concept::identical_to = is_detected_exact<Exact, Op, Args...>::value

Unpacks the constexpr boolean value from is_detected_exact

Template Parameters
ExactThe type to check identity against
OpThe operation
ArgsThe arguments to the operation.

Definition at line 194 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 194 of file TypeTraits.hpp

template<bool... Bs>
constexpr bool Acts::concept::require = std::conjunction<std::bool_constant<Bs>...>::value

Define some sort of "Domain Specific Languagr" to declare concepts a little more naturally. These are taken from https://izzys.casa/2016/09/implementing-concepts-in-cxx/ Helper which combines a set of predicates (constexpr bools) with a logical AND. Converts to std::bool_constant.

Template Parameters
BsThe booleans to combine

Definition at line 153 of file TypeTraits.hpp.

View newest version in sPHENIX GitHub at line 153 of file TypeTraits.hpp