QtRocket
 
Loading...
Searching...
No Matches
Catch::Clara::Opt Class Reference

#include <catch_amalgamated.hpp>

Inheritance diagram for Catch::Clara::Opt:
Collaboration diagram for Catch::Clara::Opt:

Public Member Functions

template<typename LambdaT>
 Opt (LambdaT const &ref)
 
 Opt (bool &ref)
 
template<typename LambdaT, typename = typename std::enable_if_t< Detail::is_unary_function<LambdaT>::value>>
 Opt (LambdaT const &ref, StringRef hint)
 
template<typename LambdaT>
 Opt (accept_many_t, LambdaT const &ref, StringRef hint)
 
template<typename T, typename = typename std::enable_if_t< !Detail::is_unary_function<T>::value>>
 Opt (T &ref, StringRef hint)
 
Optoperator[] (StringRef optName) &
 
Opt && operator[] (StringRef optName) &&
 
Detail::HelpColumns getHelpColumns () const
 
bool isMatch (StringRef optToken) const
 
Detail::InternalParseResult parse (std::string const &, Detail::TokenStream tokens) const override
 
Detail::Result validate () const override
 
- Public Member Functions inherited from Catch::Clara::Detail::ParserRefImpl< Opt >
 ParserRefImpl (accept_many_t, LambdaT const &ref, StringRef hint)
 
 ParserRefImpl (T &ref, StringRef hint)
 
 ParserRefImpl (LambdaT const &ref, StringRef hint)
 
Optoperator() (StringRef description) &
 
Opt && operator() (StringRef description) &&
 
auto optional () -> Opt &
 
auto required () -> Opt &
 
auto isOptional () const -> bool
 
auto cardinality () const -> size_t override
 
StringRef hint () const
 
- Public Member Functions inherited from Catch::Clara::Detail::ComposableParserImpl< Opt >
Parser operator| (T const &other) const
 
auto operator| (T const &other) const -> Parser
 
Parser operator| (T const &other) const
 
- Public Member Functions inherited from Catch::Clara::Detail::ParserBase
virtual ~ParserBase ()=default
 
InternalParseResult parse (Args const &args) const
 

Protected Attributes

std::vector< StringRefm_optNames
 
- Protected Attributes inherited from Catch::Clara::Detail::ParserRefImpl< Opt >
Optionality m_optionality
 
std::shared_ptr< BoundRefm_ref
 
StringRef m_hint
 
StringRef m_description
 

Additional Inherited Members

- Protected Member Functions inherited from Catch::Clara::Detail::ParserRefImpl< Opt >
 ParserRefImpl (std::shared_ptr< BoundRef > const &ref)
 

Constructor & Destructor Documentation

◆ Opt() [1/5]

template<typename LambdaT>
Catch::Clara::Opt::Opt ( LambdaT const & ref)
inlineexplicit
Here is the call graph for this function:
Here is the caller graph for this function:

◆ Opt() [2/5]

Catch::Clara::Opt::Opt ( bool & ref)
explicit
Here is the call graph for this function:

◆ Opt() [3/5]

template<typename LambdaT, typename = typename std::enable_if_t< Detail::is_unary_function<LambdaT>::value>>
Catch::Clara::Opt::Opt ( LambdaT const & ref,
StringRef hint )
inline
Here is the call graph for this function:

◆ Opt() [4/5]

template<typename LambdaT>
Catch::Clara::Opt::Opt ( accept_many_t ,
LambdaT const & ref,
StringRef hint )
inline
Here is the call graph for this function:

◆ Opt() [5/5]

template<typename T, typename = typename std::enable_if_t< !Detail::is_unary_function<T>::value>>
Catch::Clara::Opt::Opt ( T & ref,
StringRef hint )
inline
Here is the call graph for this function:

Member Function Documentation

◆ getHelpColumns()

Detail::HelpColumns Catch::Clara::Opt::getHelpColumns ( ) const
Here is the call graph for this function:

◆ isMatch()

bool Catch::Clara::Opt::isMatch ( StringRef optToken) const
Here is the caller graph for this function:

◆ operator[]() [1/2]

Opt & Catch::Clara::Opt::operator[] ( StringRef optName) &
inline
Here is the call graph for this function:

◆ operator[]() [2/2]

Opt && Catch::Clara::Opt::operator[] ( StringRef optName) &&
inline
Here is the call graph for this function:

◆ parse()

Detail::InternalParseResult Catch::Clara::Opt::parse ( std::string const & ,
Detail::TokenStream tokens ) const
overridevirtual

Implements Catch::Clara::Detail::ParserBase.

Here is the call graph for this function:

◆ validate()

Detail::Result Catch::Clara::Opt::validate ( ) const
overridevirtual

Reimplemented from Catch::Clara::Detail::ParserBase.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_optNames

std::vector<StringRef> Catch::Clara::Opt::m_optNames
protected

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