#include <CommandLine.h>
Public Member Functions | |
Visibility (const String &pattern, bool mustMatch=true) | |
bool | any () const |
bool | matches (const String &command) const |
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.
sptk::CommandLine::Visibility::Visibility | ( | const String & | pattern, |
bool | mustMatch = true |
||
) |
Constructor
pattern | Regular expression to match or do not match command line argument. If empty then it matches any argument. |
mustMatch | If true then regular expression should match, otherwiseit shouldn't match. |
bool sptk::CommandLine::Visibility::any | ( | ) | const |
Returns true if there is no regular expression to match, and matches any argument.
bool sptk::CommandLine::Visibility::matches | ( | const String & | command | ) | const |
Returns true if matches given argument or command.