Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
Catch::Matchers::Generic::PredicateMatcher< T > Class Template Reference

#include <catch.hpp>

Inheritance diagram for Catch::Matchers::Generic::PredicateMatcher< T >:
Collaboration diagram for Catch::Matchers::Generic::PredicateMatcher< T >:

Public Member Functions

 PredicateMatcher (std::function< bool(T const &)> const &elem, std::string const &descr)
 
bool match (T const &item) const override
 
std::string describe () const override
 

Private Attributes

std::function< bool(T const &)> m_predicate
 
std::string m_description
 

Detailed Description

template<typename T>
class Catch::Matchers::Generic::PredicateMatcher< T >

Definition at line 2634 of file catch.hpp.

Constructor & Destructor Documentation

template<typename T>
Catch::Matchers::Generic::PredicateMatcher< T >::PredicateMatcher ( std::function< bool(T const &)> const &  elem,
std::string const &  descr 
)
inline

Definition at line 2639 of file catch.hpp.

2640  :m_predicate(std::move(elem)),
2642  {}
std::string finalizeDescription(const std::string &desc)
std::function< bool(T const &)> m_predicate
Definition: catch.hpp:2635

Member Function Documentation

template<typename T>
std::string Catch::Matchers::Generic::PredicateMatcher< T >::describe ( ) const
inlineoverride

Definition at line 2648 of file catch.hpp.

2648  {
2649  return m_description;
2650  }
template<typename T>
bool Catch::Matchers::Generic::PredicateMatcher< T >::match ( T const &  item) const
inlineoverride

Definition at line 2644 of file catch.hpp.

2644  {
2645  return m_predicate(item);
2646  }
std::function< bool(T const &)> m_predicate
Definition: catch.hpp:2635

Member Data Documentation

template<typename T>
std::string Catch::Matchers::Generic::PredicateMatcher< T >::m_description
private

Definition at line 2636 of file catch.hpp.

template<typename T>
std::function<bool(T const&)> Catch::Matchers::Generic::PredicateMatcher< T >::m_predicate
private

Definition at line 2635 of file catch.hpp.


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