Public Member Functions | Private Attributes | List of all members
art::ExecutionCounts< ARGS > Class Template Reference

#include <ExecutionCounts.h>

Public Member Functions

template<typename FIELD >
std::size_t times () const
 
template<typename FIELD >
void increment ()
 
template<typename HEAD_FIELD , typename... TAIL_FIELDS>
std::enable_if_t<(sizeof...(TAIL_FIELDS) > 0)> increment ()
 
void update (bool const rc)
 
void reset ()
 

Private Attributes

std::tuple< ARGS... > counts_
 

Detailed Description

template<typename... ARGS>
class art::ExecutionCounts< ARGS >

Definition at line 36 of file ExecutionCounts.h.

Member Function Documentation

template<typename... ARGS>
template<typename FIELD >
void art::ExecutionCounts< ARGS >::increment ( )
inline

Definition at line 48 of file ExecutionCounts.h.

49  {
50  ++std::get<FIELD>(counts_).value;
51  }
std::tuple< ARGS... > counts_
template<typename... ARGS>
template<typename HEAD_FIELD , typename... TAIL_FIELDS>
std::enable_if_t<(sizeof...(TAIL_FIELDS) > 0)> art::ExecutionCounts< ARGS >::increment ( )
inline

Definition at line 55 of file ExecutionCounts.h.

56  {
57  increment<HEAD_FIELD>();
58  increment<TAIL_FIELDS...>();
59  }
template<typename... ARGS>
void art::ExecutionCounts< ARGS >::reset ( )
inline

Definition at line 72 of file ExecutionCounts.h.

73  {
74  counts_ = std::tuple<ARGS...>();
75  }
std::tuple< ARGS... > counts_
template<typename... ARGS>
template<typename FIELD >
std::size_t art::ExecutionCounts< ARGS >::times ( ) const
inline

Definition at line 41 of file ExecutionCounts.h.

42  {
43  return std::get<FIELD>(counts_).value;
44  }
std::tuple< ARGS... > counts_
template<typename... ARGS>
void art::ExecutionCounts< ARGS >::update ( bool const  rc)
inline

Definition at line 62 of file ExecutionCounts.h.

63  {
64  if (rc) {
65  increment<stats::Passed>();
66  } else {
67  increment<stats::Failed>();
68  }
69  }

Member Data Documentation

template<typename... ARGS>
std::tuple<ARGS...> art::ExecutionCounts< ARGS >::counts_
private

Definition at line 78 of file ExecutionCounts.h.


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