sptk2 logo
SPTK Home Page
Public Member Functions | List of all members
sptk::CommandLine::Visibility Class Reference

#include <CommandLine.h>

Public Member Functions

 Visibility (const String &pattern, bool mustMatch=true)
 
bool any () const
 
bool matches (const String &command) const
 

Detailed Description

Option visibility for an argument or command.

Argument(s) are defined with regular expression, that ether should match or should not match depending on constructor mustMatch parameter value.

Constructor & Destructor Documentation

◆ Visibility()

sptk::CommandLine::Visibility::Visibility ( const String pattern,
bool  mustMatch = true 
)

Constructor

Parameters
patternRegular expression to match or do not match command line argument. If empty then it matches any argument.
mustMatchIf true then regular expression should match, otherwiseit shouldn't match.

Member Function Documentation

◆ any()

bool sptk::CommandLine::Visibility::any ( ) const

Returns true if there is no regular expression to match, and matches any argument.

◆ matches()

bool sptk::CommandLine::Visibility::matches ( const String command) const

Returns true if matches given argument or command.


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

Fri Oct 14 2022 09:58:38: SPTK 5.4.1