libvariant
 All Classes Namespaces Files Functions Enumerations Groups
Public Member Functions | Friends | List of all members
libvariant::ArgParseOption Class Reference

ArgParseOption is a part of class ArgParse. More...

#include <Variant/ArgParse.h>

Public Member Functions

ArgParseOptionTitle (const std::string &title)
 Set the title of this option. The title is used.
 
ArgParseOptionAction (ArgParseAction action)
 What action to perform when this option is encountered.
 
DEPRECATED ArgParseOptionAction (const std::string &action)
 
ArgParseOptionType (ArgParseType type)
 Set the type parsing and validation.
 
DEPRECATED ArgParseOptionType (Variant::Type_t type)
 
DEPRECATED ArgParseOptionType (const std::string &type)
 
ArgParseOptionConst (Variant val)
 Set the const value for "store_const".
 
ArgParseOptionDefault (Variant val)
 Set the default value used when the option is not set.
 
ArgParseOptionEnv (const char *env)
 Set the environment variable name to check for a value for this option.
 
ArgParseOptionMinimum (Variant val)
 If the resulting value is a number, require to be at least this minimum.
 
ArgParseOptionMaximum (Variant val)
 If the resulting value is a number, require to be at most this maximum.
 
ArgParseOptionAddChoice (Variant val)
 Add choices.
 
ArgParseOptionSetChoices (const std::vector< Variant > &val)
 Set choices (old ones forgotten) from a vector.
 
const std::vector< Variant > & GetChoices ()
 Return the vector of choices set.
 
ArgParseOptionRequired (bool req=true)
 Is this option required?
 
ArgParseOptionHelp (const std::string &helptxt)
 Set the help text for this option.
 
ArgParseOptionPattern (const std::string &pattern)
 If this option is a string, it must match the regex in pattern.
 
ArgParseOptionMaxLength (unsigned l)
 If this option is a string, it must be no longer than maxLength.
 
ArgParseOptionMinLength (unsigned l)
 If this option is a string, it must be no shorter than minLength.
 
ArgParseOptionMinArgs (unsigned l)
 If this option can be specified multiple times, it must be.
 
ArgParseOptionMaxArgs (unsigned l)
 If this option can be specified multiple times, it cannot be.
 
ArgParseOptionNumArgs (unsigned l)
 Specify that this argument must be present l times.
 
ArgParseOptionGroup (const std::string &gname)
 Adds this option to group gname. If gname does not exist,.
 
ArgParseOptionAdvanced (bool adv=true)
 Sets this argument to be an advanced option.
 

Friends

class ArgParse
 

Detailed Description

ArgParseOption is a part of class ArgParse.


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