Fast Methods for Cosmological Simulations
FastSim serves as a tool for quick N-body simulations in modified gravity.
Catch::Matchers::Impl::MatchAnyOf< ArgT > Struct Template Reference

#include <catch.hpp>

Inheritance diagram for Catch::Matchers::Impl::MatchAnyOf< ArgT >:
Collaboration diagram for Catch::Matchers::Impl::MatchAnyOf< ArgT >:

Public Member Functions

bool match (ArgT const &arg) const override
 
std::string describe () const override
 
MatchAnyOf< ArgT > & operator|| (MatcherBase< ArgT > const &other)
 
- Public Member Functions inherited from Catch::Matchers::Impl::MatcherBase< ArgT >
MatchAllOf< ArgT > operator&& (MatcherBase const &other) const
 
MatchAnyOf< ArgT > operator|| (MatcherBase const &other) const
 
MatchNotOf< ArgT > operator! () const
 
- Public Member Functions inherited from Catch::Matchers::Impl::MatcherUntypedBase
 MatcherUntypedBase ()=default
 
 MatcherUntypedBase (MatcherUntypedBase const &)=default
 
MatcherUntypedBaseoperator= (MatcherUntypedBase const &)=delete
 
std::string toString () const
 

Public Attributes

std::vector< MatcherBase< ArgT > const * > m_matchers
 

Additional Inherited Members

- Protected Member Functions inherited from Catch::Matchers::Impl::MatcherUntypedBase
virtual ~MatcherUntypedBase ()
 
- Protected Attributes inherited from Catch::Matchers::Impl::MatcherUntypedBase
std::string m_cachedToString
 

Detailed Description

template<typename ArgT>
struct Catch::Matchers::Impl::MatchAnyOf< ArgT >

Definition at line 2431 of file catch.hpp.

Member Function Documentation

template<typename ArgT>
std::string Catch::Matchers::Impl::MatchAnyOf< ArgT >::describe ( ) const
inlineoverridevirtual

Implements Catch::Matchers::Impl::MatcherUntypedBase.

Definition at line 2515 of file catch.hpp.

References setup::description.

2515  {
2516  std::string description;
2517  description.reserve( 4 + m_matchers.size()*32 );
2518  description += "( ";
2519  bool first = true;
2520  for( auto matcher : m_matchers ) {
2521  if( first )
2522  first = false;
2523  else
2524  description += " or ";
2525  description += matcher->toString();
2526  }
2527  description += " )";
2528  return description;
2529  }
description
Definition: setup.py:40
std::vector< MatcherBase< ArgT > const * > m_matchers
Definition: catch.hpp:2536
template<typename ArgT>
bool Catch::Matchers::Impl::MatchAnyOf< ArgT >::match ( ArgT const &  arg) const
inlineoverridevirtual

Implements Catch::Matchers::Impl::MatcherMethod< ArgT >.

Definition at line 2508 of file catch.hpp.

2508  {
2509  for( auto matcher : m_matchers ) {
2510  if (matcher->match(arg))
2511  return true;
2512  }
2513  return false;
2514  }
std::vector< MatcherBase< ArgT > const * > m_matchers
Definition: catch.hpp:2536
template<typename ArgT>
MatchAnyOf<ArgT>& Catch::Matchers::Impl::MatchAnyOf< ArgT >::operator|| ( MatcherBase< ArgT > const &  other)
inline

Definition at line 2531 of file catch.hpp.

2531  {
2532  m_matchers.push_back( &other );
2533  return *this;
2534  }
std::vector< MatcherBase< ArgT > const * > m_matchers
Definition: catch.hpp:2536

Member Data Documentation

template<typename ArgT>
std::vector<MatcherBase<ArgT> const*> Catch::Matchers::Impl::MatchAnyOf< ArgT >::m_matchers

Definition at line 2536 of file catch.hpp.


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