20 #ifndef _BASIS_CMDARGS_H 21 #define _BASIS_CMDARGS_H 24 #include "tclap/SwitchArg.h" 25 #include "tclap/MultiSwitchArg.h" 26 #include "tclap/UnlabeledValueArg.h" 27 #include "tclap/UnlabeledMultiArg.h" 32 #include "tclap/Constraint.h" 161 virtual std::string
description()
const {
return "Value must be negative."; }
163 virtual bool check(
const T& value)
const {
return value < 0; }
177 virtual std::string
description()
const {
return "Value must be less or equal to zero."; }
179 virtual bool check(
const T& value)
const {
return value <= 0; }
193 virtual std::string
description()
const {
return "Value must not be zero."; }
195 virtual bool check(
const T& value)
const {
return value != 0; }
209 virtual std::string
description()
const {
return "Value must be positive."; }
211 virtual bool check(
const T& value)
const {
return value > 0; }
225 virtual std::string
description()
const {
return "Value must be greater or equal to zero."; }
227 virtual bool check(
const T& value)
const {
return value >= 0; }
244 virtual std::string
description()
const {
return "Value must name an existing file."; }
259 virtual std::string
description()
const {
return "Value must name an existing directory."; }
274 #endif // _BASIS_CMDARGS_H
basis::MultiArg< int > MultiIntArg
Alias for MultiInt32Arg.
Constrain argument values to paths of existing directories.
virtual std::string shortID() const
virtual bool check(const T &value) const
basis::MultiArg< unsigned long > MultiUInt64Arg
Unsigned 64-bit integer argument (multiple occurrences allowed).
PositiveValueConstraint(const std::string &typeDesc)
basis::ValueArg< unsigned int > UInt32Arg
Unsigned 32-bit integer argument.
virtual std::string shortID() const
virtual bool check(const T &value) const
virtual std::string description() const
An argument that allows multiple values of type T to be specified.
virtual bool check(const std::string &value) const
basis::MultiArg< long > MultiInt64Arg
Signed 64-bit integer argument (multiple occurrences allowed).
basis::MultiArg< double > MultiDoubleArg
Floating-point argument (double precision, multiple occurrences allowed).
virtual ~ExistingDirectoryConstraint()
virtual std::string description() const
TCLAP::SwitchArg SwitchArg
Switch to enable/disable option.
basis::ValueArg< std::string > StringArg
String argument.
Constrain argument values to negative values.
virtual std::string shortID() const
basis::MultiArg< unsigned int > MultiUInt32Arg
Unsigned 32-bit integer argument (multiple occurrences allowed).
basis::ValueArg< float > FloatArg
Floating-point argument.
basis::ValueArg< long > Int64Arg
Signed 64-bit integer argument.
virtual ~ExistingFileConstraint()
ExistingDirectoryConstraint(const std::string &typeDesc="<dir>")
virtual std::string shortID() const
basis::ValueArg< unsigned long > UInt64Arg
Unsigned 64-bit integer argument.
TCLAP::UnlabeledMultiArg< std::string > PositionalArgs
Positional arguments.
basis::ValueArg< int > Int32Arg
Signed 32-bit integer argument.
virtual std::string description() const
basis::MultiArg< std::string > MultiStringArg
String argument (multiple occurrences allowed).
bool isfile(const std::string path)
Test whether a given path is the path of an existent file.
virtual ~PositiveValueConstraint()
virtual bool check(const T &value) const
ExistingFileConstraint(const std::string &typeDesc="<file>")
basis::ValueArg< unsigned int > UIntArg
Alias for UInt32Arg.
virtual std::string shortID() const
Constrain argument values to positive values.
virtual std::string description() const
virtual std::string description() const
Constrain argument values to zero or positive values.
virtual ~NegativeValueConstraint()
virtual ~ZeroOrPositiveValueConstraint()
TCLAP::Arg Arg
Base type of command-line arguments.
virtual std::string description() const
virtual ~NonZeroValueConstraint()
TCLAP::ValuesConstraint< std::string > StringValuesConstraint
Constrains string arguments to allow only predefined values.
virtual std::string shortID() const
File/directory path related functions.
NegativeValueConstraint(const std::string &typeDesc)
NonZeroValueConstraint(const std::string &typeDesc)
Constrain argument values to non-zero values.
Constrain argument values to zero or negative values.
basis::MultiArg< float > MultiFloatArg
Floating-point argument (multiple occurrences allowed).
virtual bool check(const T &value) const
bool isdir(const std::string path)
Test whether a given path is the path of an existent directory.
virtual std::string shortID() const
basis::MultiArg< unsigned int > MultiUIntArg
Alias for MultiUInt32Arg.
basis::ValueArg< int > IntArg
Alias for Int32Arg.
virtual ~ZeroOrNegativeValueConstraint()
TCLAP::UnlabeledValueArg< std::string > PositionalArg
Positional argument.
Constrain argument values to paths of existing files.
virtual bool check(const std::string &value) const
ZeroOrPositiveValueConstraint(const std::string &typeDesc)
Extends TCLAP's MultiArg implementation.
TCLAP::MultiSwitchArg MultiSwitchArg
Counts occurrences of option switch.
basis::ValueArg< double > DoubleArg
Floating-point argument (double precision).
virtual bool check(const T &value) const
ZeroOrNegativeValueConstraint(const std::string &typeDesc)
Extends TCLAP's ValueArg implementation.
basis::MultiArg< int > MultiInt32Arg
Signed 32-bit integer argument (multiple occurrences allowed).
An argument that allows multiple values of type T to be specified.
virtual std::string description() const