ManaPlus
Public Member Functions | Private Member Functions | Private Attributes
Catch::ExpressionLhs< T > Class Template Reference

#include <catch.hpp>

Public Member Functions

 ExpressionLhs (ResultBuilder &rb, T lhs)
 
template<typename RhsT >
ResultBuilderoperator== (RhsT const &rhs)
 
template<typename RhsT >
ResultBuilderoperator!= (RhsT const &rhs)
 
template<typename RhsT >
ResultBuilderoperator< (RhsT const &rhs)
 
template<typename RhsT >
ResultBuilderoperator> (RhsT const &rhs)
 
template<typename RhsT >
ResultBuilderoperator<= (RhsT const &rhs)
 
template<typename RhsT >
ResultBuilderoperator>= (RhsT const &rhs)
 
ResultBuilderoperator== (bool rhs)
 
ResultBuilderoperator!= (bool rhs)
 
void endExpression ()
 
template<typename RhsT >
STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison & operator+ (RhsT const &)
 
template<typename RhsT >
STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison & operator- (RhsT const &)
 
template<typename RhsT >
STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison & operator/ (RhsT const &)
 
template<typename RhsT >
STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison & operator* (RhsT const &)
 
template<typename RhsT >
STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison & operator&& (RhsT const &)
 
template<typename RhsT >
STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison & operator|| (RhsT const &)
 

Private Member Functions

ExpressionLhsoperator= (ExpressionLhs const &)
 
template<Internal::Operator Op, typename RhsT >
ResultBuildercaptureExpression (RhsT const &rhs)
 

Private Attributes

ResultBuilderm_rb
 
m_lhs
 

Detailed Description

template<typename T>
class Catch::ExpressionLhs< T >

Definition at line 1800 of file catch.hpp.

Constructor & Destructor Documentation

◆ ExpressionLhs()

template<typename T >
Catch::ExpressionLhs< T >::ExpressionLhs ( ResultBuilder rb,
lhs 
)
inline

Definition at line 1807 of file catch.hpp.

1807 : m_rb( rb ), m_lhs( lhs ) {}
ResultBuilder & m_rb
Definition: catch.hpp:1879

Member Function Documentation

◆ captureExpression()

template<typename T >
template<Internal::Operator Op, typename RhsT >
ResultBuilder& Catch::ExpressionLhs< T >::captureExpression ( RhsT const &  rhs)
inlineprivate

Definition at line 1870 of file catch.hpp.

1870  {
1871  return m_rb
1872  .setResultType( Internal::compare<Op>( m_lhs, rhs ) )
1874  .setRhs( Catch::toString( rhs ) )
1876  }
ResultBuilder & setLhs(std::string const &lhs)
ResultBuilder & setOp(std::string const &op)
ResultBuilder & setRhs(std::string const &rhs)
ResultBuilder & setResultType(ResultWas::OfType result)
std::string toString(T const &value)
converts any type to a string
Definition: catch.hpp:1774
static const char * getName()
Definition: catch.hpp:1310

References Catch::ResultBuilder::setLhs(), Catch::ResultBuilder::setOp(), Catch::ResultBuilder::setResultType(), Catch::ResultBuilder::setRhs(), and Catch::toString().

◆ endExpression()

template<typename T >
void Catch::ExpressionLhs< T >::endExpression ( )
inline

Definition at line 1851 of file catch.hpp.

1851  {
1852  bool value = m_lhs ? true : false;
1853  m_rb
1854  .setLhs( Catch::toString( value ) )
1855  .setResultType( value )
1856  .endExpression();
1857  }

References Catch::toString().

◆ operator!=() [1/2]

template<typename T >
ResultBuilder& Catch::ExpressionLhs< T >::operator!= ( bool  rhs)
inline

Definition at line 1847 of file catch.hpp.

1847  {
1848  return captureExpression<Internal::IsNotEqualTo>( rhs );
1849  }

◆ operator!=() [2/2]

template<typename T >
template<typename RhsT >
ResultBuilder& Catch::ExpressionLhs< T >::operator!= ( RhsT const &  rhs)
inline

Definition at line 1819 of file catch.hpp.

1819  {
1820  return captureExpression<Internal::IsNotEqualTo>( rhs );
1821  }

◆ operator&&()

template<typename T >
template<typename RhsT >
STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& Catch::ExpressionLhs< T >::operator&& ( RhsT const &  )

◆ operator*()

template<typename T >
template<typename RhsT >
STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& Catch::ExpressionLhs< T >::operator* ( RhsT const &  )

◆ operator+()

template<typename T >
template<typename RhsT >
STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& Catch::ExpressionLhs< T >::operator+ ( RhsT const &  )

◆ operator-()

template<typename T >
template<typename RhsT >
STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& Catch::ExpressionLhs< T >::operator- ( RhsT const &  )

◆ operator/()

template<typename T >
template<typename RhsT >
STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& Catch::ExpressionLhs< T >::operator/ ( RhsT const &  )

◆ operator<()

template<typename T >
template<typename RhsT >
ResultBuilder& Catch::ExpressionLhs< T >::operator< ( RhsT const &  rhs)
inline

Definition at line 1824 of file catch.hpp.

1824  {
1825  return captureExpression<Internal::IsLessThan>( rhs );
1826  }

◆ operator<=()

template<typename T >
template<typename RhsT >
ResultBuilder& Catch::ExpressionLhs< T >::operator<= ( RhsT const &  rhs)
inline

Definition at line 1834 of file catch.hpp.

1834  {
1835  return captureExpression<Internal::IsLessThanOrEqualTo>( rhs );
1836  }

◆ operator=()

template<typename T >
ExpressionLhs& Catch::ExpressionLhs< T >::operator= ( ExpressionLhs< T > const &  )
private

◆ operator==() [1/2]

template<typename T >
ResultBuilder& Catch::ExpressionLhs< T >::operator== ( bool  rhs)
inline

Definition at line 1843 of file catch.hpp.

1843  {
1844  return captureExpression<Internal::IsEqualTo>( rhs );
1845  }

◆ operator==() [2/2]

template<typename T >
template<typename RhsT >
ResultBuilder& Catch::ExpressionLhs< T >::operator== ( RhsT const &  rhs)
inline

Definition at line 1814 of file catch.hpp.

1814  {
1815  return captureExpression<Internal::IsEqualTo>( rhs );
1816  }

◆ operator>()

template<typename T >
template<typename RhsT >
ResultBuilder& Catch::ExpressionLhs< T >::operator> ( RhsT const &  rhs)
inline

Definition at line 1829 of file catch.hpp.

1829  {
1830  return captureExpression<Internal::IsGreaterThan>( rhs );
1831  }

◆ operator>=()

template<typename T >
template<typename RhsT >
ResultBuilder& Catch::ExpressionLhs< T >::operator>= ( RhsT const &  rhs)
inline

Definition at line 1839 of file catch.hpp.

1839  {
1840  return captureExpression<Internal::IsGreaterThanOrEqualTo>( rhs );
1841  }

◆ operator||()

template<typename T >
template<typename RhsT >
STATIC_ASSERT_Expression_Too_Complex_Please_Rewrite_As_Binary_Comparison& Catch::ExpressionLhs< T >::operator|| ( RhsT const &  )

Field Documentation

◆ m_lhs

template<typename T >
T Catch::ExpressionLhs< T >::m_lhs
private

Definition at line 1880 of file catch.hpp.

◆ m_rb

template<typename T >
ResultBuilder& Catch::ExpressionLhs< T >::m_rb
private

Definition at line 1879 of file catch.hpp.


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