ManaPlus
Public Member Functions | Data Fields
Catch::Matchers::Impl::StdString::StartsWith Struct Reference

#include <catch.hpp>

Inheritance diagram for Catch::Matchers::Impl::StdString::StartsWith:
Catch::Matchers::Impl::MatcherImpl< StartsWith, std::string > Catch::Matchers::Impl::Matcher< ExpressionT > Catch::SharedImpl< IShared > Catch::IShared Catch::NonCopyable

Public Member Functions

 StartsWith (std::string const &substr, CaseSensitive::Choice caseSensitivity=CaseSensitive::Yes)
 
 StartsWith (StartsWith const &other)
 
virtual ~StartsWith ()
 
virtual bool match (std::string const &expr) const
 
virtual std::string toString () const
 
- Public Member Functions inherited from Catch::Matchers::Impl::MatcherImpl< StartsWith, std::string >
virtual Ptr< Matcher< std::string > > clone () const
 
- Public Member Functions inherited from Catch::Matchers::Impl::Matcher< ExpressionT >
virtual ~Matcher ()
 
virtual bool match (ExpressionT const &expr) const =0
 
Generic::AllOf< ExpressionT > operator&& (Matcher< ExpressionT > const &other) const
 
Generic::AnyOf< ExpressionT > operator|| (Matcher< ExpressionT > const &other) const
 
Generic::Not< ExpressionT > operator! () const
 
- Public Member Functions inherited from Catch::SharedImpl< IShared >
 SharedImpl ()
 
virtual void addRef () const
 
virtual void release () const
 
- Public Member Functions inherited from Catch::IShared
virtual ~IShared ()
 

Data Fields

CasedString m_data
 
- Data Fields inherited from Catch::SharedImpl< IShared >
unsigned int m_rc
 

Additional Inherited Members

- Public Types inherited from Catch::Matchers::Impl::Matcher< ExpressionT >
typedef ExpressionT ExpressionType
 
- Protected Member Functions inherited from Catch::NonCopyable
 NonCopyable ()
 
virtual ~NonCopyable ()
 

Detailed Description

Definition at line 1107 of file catch.hpp.

Constructor & Destructor Documentation

◆ StartsWith() [1/2]

Catch::Matchers::Impl::StdString::StartsWith::StartsWith ( std::string const &  substr,
CaseSensitive::Choice  caseSensitivity = CaseSensitive::Yes 
)
inline

Definition at line 1108 of file catch.hpp.

1109  : m_data( substr, caseSensitivity ){}

◆ StartsWith() [2/2]

Catch::Matchers::Impl::StdString::StartsWith::StartsWith ( StartsWith const &  other)
inline

Definition at line 1111 of file catch.hpp.

1111 : m_data( other.m_data ){}

◆ ~StartsWith()

virtual Catch::Matchers::Impl::StdString::StartsWith::~StartsWith ( )
virtual

Member Function Documentation

◆ match()

virtual bool Catch::Matchers::Impl::StdString::StartsWith::match ( std::string const &  expr) const
inlinevirtual

Definition at line 1115 of file catch.hpp.

1115  {
1116  return startsWith( m_data.adjustString( expr ), m_data.m_str );
1117  }
bool startsWith(std::string const &s, std::string const &prefix)
std::string adjustString(std::string const &str) const
Definition: catch.hpp:1056

References Catch::startsWith().

◆ toString()

virtual std::string Catch::Matchers::Impl::StdString::StartsWith::toString ( ) const
inlinevirtual

Implements Catch::Matchers::Impl::Matcher< ExpressionT >.

Definition at line 1118 of file catch.hpp.

1118  {
1119  return "starts with: \"" + m_data.m_str + "\"" + m_data.toStringSuffix();
1120  }

Field Documentation

◆ m_data

CasedString Catch::Matchers::Impl::StdString::StartsWith::m_data

Definition at line 1122 of file catch.hpp.


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