|
Open CASCADE Technology
7.0.0
|
Command parser. More...
#include <ViewerTest_CmdParser.hxx>
Public Member Functions | |
| ViewerTest_CmdParser () | |
| Initializes default option. More... | |
| void | AddDescription (const std::string &theDescription) |
| Sets description for command. More... | |
| void | AddOption (const std::string &theOptionNames, const std::string &theOptionDescription) |
| Adds option to available option list. Several names may be provided if separated with '|'. More... | |
| void | Help () |
| Prints help message based on provided command and options descriptions. More... | |
| void | Parse (Standard_Integer theArgsNb, const char **theArgVec) |
| Parses argument list; assignes local arguments to each option. More... | |
| Standard_Boolean | HasOption (const std::string &theOptionName, Standard_Integer theMandatoryArgsNb=0, Standard_Boolean isFatal=Standard_False) |
| Checks if option was set with given minimal argument number. Prints error message if isFatal flag was set. More... | |
| std::string | Arg (const std::string &theOptionName, Standard_Integer theArgumentIndex) |
| Accesses local argument of option 'theOptionName' with index 'theArgumentIndex'. More... | |
| Graphic3d_Vec3 | ArgVec3f (const std::string &theOptionName) |
| Graphic3d_Vec3d | ArgVec3d (const std::string &theOptionName) |
| Standard_Real | ArgDouble (const std::string &theOptionName) |
| Standard_ShortReal | ArgFloat (const std::string &theOptionName) |
Command parser.
| ViewerTest_CmdParser::ViewerTest_CmdParser | ( | ) |
Initializes default option.
|
inline |
Sets description for command.
| void ViewerTest_CmdParser::AddOption | ( | const std::string & | theOptionNames, |
| const std::string & | theOptionDescription | ||
| ) |
Adds option to available option list. Several names may be provided if separated with '|'.
| std::string ViewerTest_CmdParser::Arg | ( | const std::string & | theOptionName, |
| Standard_Integer | theArgumentIndex | ||
| ) |
Accesses local argument of option 'theOptionName' with index 'theArgumentIndex'.
| Standard_Real ViewerTest_CmdParser::ArgDouble | ( | const std::string & | theOptionName | ) |
| Standard_ShortReal ViewerTest_CmdParser::ArgFloat | ( | const std::string & | theOptionName | ) |
| Graphic3d_Vec3d ViewerTest_CmdParser::ArgVec3d | ( | const std::string & | theOptionName | ) |
| Graphic3d_Vec3 ViewerTest_CmdParser::ArgVec3f | ( | const std::string & | theOptionName | ) |
| Standard_Boolean ViewerTest_CmdParser::HasOption | ( | const std::string & | theOptionName, |
| Standard_Integer | theMandatoryArgsNb = 0, |
||
| Standard_Boolean | isFatal = Standard_False |
||
| ) |
Checks if option was set with given minimal argument number. Prints error message if isFatal flag was set.
| void ViewerTest_CmdParser::Help | ( | ) |
Prints help message based on provided command and options descriptions.
| void ViewerTest_CmdParser::Parse | ( | Standard_Integer | theArgsNb, |
| const char ** | theArgVec | ||
| ) |
Parses argument list; assignes local arguments to each option.
1.8.10