Base Module VST 3.7
SDK for developing VST plug-in
|
List of command-line option descriptions. More...
#include <fcommandline.h>
Public Member Functions | |
Descriptions & | addOptions (const std::string &caption="", std::initializer_list< Description > &&options={}) |
Sets the command-line tool caption and starts adding Descriptions. More... | |
bool | parse (int ac, char *av[], VariablesMap &result, FilesVector *files=nullptr) const |
Parse the command-line. More... | |
void | print (std::ostream &os) const |
Print a brief description for the command-line tool into the stream os . More... | |
Descriptions & | operator() (const std::string &name, const std::string &help) |
Add a new switch. More... | |
template<typename Type > | |
Descriptions & | operator() (const std::string &name, const Type &inType, std::string help) |
Add a new option of type inType . More... | |
template<> | |
Descriptions & | operator() (const std::string &name, const std::string &inType, std::string help) |
Add a new option with a string as parameter. More... | |
List of command-line option descriptions.
Use addOptions (const std::string&) to add Descriptions.
Descriptions & addOptions | ( | const std::string & | caption = "" , |
std::initializer_list< Description > && | options = {} |
||
) |
Sets the command-line tool caption and starts adding Descriptions.
Usage example:
Or with initializer list :
[in] | caption | the caption of the command-line tool. |
[in] | options | initializer list with options |
bool parse | ( | int | ac, |
char * | av[], | ||
VariablesMap & | result, | ||
FilesVector * | files = nullptr |
||
) | const |
Parse the command-line.
[in] | ac | count of command-line parameters |
[in] | av | command-line as array of strings |
[out] | result | the parsing result |
[out] | files | optional list of elements on the command line that are not handled by options parsing |
void print | ( | std::ostream & | os | ) | const |
Print a brief description for the command-line tool into the stream os
.
The description includes the help strings for all options.
Descriptions & operator() | ( | const std::string & | name, |
const std::string & | help | ||
) |
Add a new switch.
Only
Returning a reference to *this, enables chaining of calls to operator()(const std::string&, const std::string&).
[in] | name | of the added option. |
[in] | help | a help description for this option. |
Descriptions & operator() | ( | const std::string & | name, |
const Type & | inType, | ||
std::string | help | ||
) |
Add a new option of type inType
.
Currently only std::string is supported.
Descriptions & operator() | ( | const std::string & | name, |
const std::string & | inType, | ||
std::string | help | ||
) |
Add a new option with a string as parameter.