Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
Catch::clara::detail::ExeName Class Reference

#include <clara.hpp>

Inheritance diagram for Catch::clara::detail::ExeName:
Collaboration diagram for Catch::clara::detail::ExeName:

Public Member Functions

 ExeName ()
 
 ExeName (std::string &ref)
 
template<typename LambdaT >
 ExeName (LambdaT const &lambda)
 
auto parse (std::string const &, TokenStream const &tokens) const -> InternalParseResult override
 
auto name () const -> std::string
 
auto set (std::string const &newName) -> ParserResult
 
- Public Member Functions inherited from Catch::clara::detail::ComposableParserImpl< ExeName >
auto operator| (T const &other) const -> Parser
 
auto operator+ (T const &other) const -> Parser
 
- Public Member Functions inherited from Catch::clara::detail::ParserBase
virtual ~ParserBase ()=default
 
virtual auto validate () const -> Result
 
virtual auto cardinality () const -> size_t
 
auto parse (Args const &args) const -> InternalParseResult
 

Detailed Description

Definition at line 884 of file clara.hpp.

Constructor & Destructor Documentation

◆ ExeName() [1/3]

Catch::clara::detail::ExeName::ExeName ( )
inline

Definition at line 894 of file clara.hpp.

894: m_name( std::make_shared<std::string>( "<executable>" ) ) {}

◆ ExeName() [2/3]

Catch::clara::detail::ExeName::ExeName ( std::string & ref)
inlineexplicit

Definition at line 896 of file clara.hpp.

896 : ExeName() {
897 m_ref = std::make_shared<BoundValueRef<std::string>>( ref );
898 }

◆ ExeName() [3/3]

template<typename LambdaT >
Catch::clara::detail::ExeName::ExeName ( LambdaT const & lambda)
inlineexplicit

Definition at line 901 of file clara.hpp.

901 : ExeName() {
902 m_ref = std::make_shared<BoundLambda<LambdaT>>( lambda );
903 }

Member Function Documentation

◆ name()

auto Catch::clara::detail::ExeName::name ( ) const -> std::string
inline

Definition at line 910 of file clara.hpp.

910{ return *m_name; }
Here is the caller graph for this function:

◆ parse()

auto Catch::clara::detail::ExeName::parse ( std::string const & ,
TokenStream const & tokens ) const -> InternalParseResult
inlineoverridevirtual

Implements Catch::clara::detail::ParserBase.

Definition at line 906 of file clara.hpp.

906 {
907 return InternalParseResult::ok( ParseState( ParseResultType::NoMatch, tokens ) );
908 }
static auto ok() -> BasicResult
Definition clara.hpp:593
Here is the call graph for this function:

◆ set()

auto Catch::clara::detail::ExeName::set ( std::string const & newName) -> ParserResult
inline

Definition at line 911 of file clara.hpp.

911 {
912
913 auto lastSlash = newName.find_last_of( "\\/" );
914 auto filename = ( lastSlash == std::string::npos )
915 ? newName
916 : newName.substr( lastSlash+1 );
917
918 *m_name = filename;
919 if( m_ref )
920 return m_ref->setValue( filename );
921 else
923 }
Here is the call graph for this function:
Here is the caller graph for this function:

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