Public Types | |
| typedef std::map< std::string, std::string > | UsageMap |
| COMMAND_LINE_OPTION = 0x1 | |
| ENVIRONMENTAL_VARIABLE = 0x2 | |
| KEYBOARD_MOUSE_BINDING = 0x4 | |
| enum | Type { COMMAND_LINE_OPTION = 0x1, ENVIRONMENTAL_VARIABLE = 0x2, KEYBOARD_MOUSE_BINDING = 0x4 } |
Public Member Functions | |
| ApplicationUsage () | |
| ApplicationUsage (const std::string &commandLineUsage) | |
| void | setApplicationName (const std::string &name) |
| const std::string & | getApplicationName () const |
| void | setDescription (const std::string &desc) |
| const std::string & | getDescription () const |
| void | addUsageExplanation (Type type, const std::string &option, const std::string &explanation) |
| void | setCommandLineUsage (const std::string &explanation) |
| const std::string & | getCommandLineUsage () const |
| void | addCommandLineOption (const std::string &option, const std::string &explanation, const std::string &defaultValue="") |
| void | setCommandLineOptions (const UsageMap &usageMap) |
| const UsageMap & | getCommandLineOptions () const |
| void | setCommandLineOptionsDefaults (const UsageMap &usageMap) |
| const UsageMap & | getCommandLineOptionsDefaults () const |
| void | addEnvironmentalVariable (const std::string &option, const std::string &explanation, const std::string &defaultValue="") |
| void | setEnvironmentalVariables (const UsageMap &usageMap) |
| const UsageMap & | getEnvironmentalVariables () const |
| void | setEnvironmentalVariablesDefaults (const UsageMap &usageMap) |
| const UsageMap & | getEnvironmentalVariablesDefaults () const |
| void | addKeyboardMouseBinding (const std::string &option, const std::string &explanation) |
| void | setKeyboardMouseBindings (const UsageMap &usageMap) |
| const UsageMap & | getKeyboardMouseBindings () const |
| void | getFormattedString (std::string &str, const UsageMap &um, unsigned int widthOfOutput=80, bool showDefaults=false, const UsageMap &ud=UsageMap()) |
| void | write (std::ostream &output, const UsageMap &um, unsigned int widthOfOutput=80, bool showDefaults=false, const UsageMap &ud=UsageMap()) |
| void | write (std::ostream &output, unsigned int type=COMMAND_LINE_OPTION, unsigned int widthOfOutput=80, bool showDefaults=false) |
| void | writeEnvironmentSettings (std::ostream &output) |
Static Public Member Functions | |
| static ApplicationUsage * | instance () |
Protected Attributes | |
| std::string | _applicationName |
| std::string | _description |
| std::string | _commandLineUsage |
| UsageMap | _commandLineOptions |
| UsageMap | _environmentalVariables |
| UsageMap | _keyboardMouse |
| UsageMap | _environmentalVariablesDefaults |
| UsageMap | _commandLineOptionsDefaults |
| typedef std::map<std::string,std::string> osg::ApplicationUsage::UsageMap |
| osg::ApplicationUsage::ApplicationUsage | ( | ) | [inline] |
| osg::ApplicationUsage::ApplicationUsage | ( | const std::string & | commandLineUsage | ) |
| void osg::ApplicationUsage::addCommandLineOption | ( | const std::string & | option, | |
| const std::string & | explanation, | |||
| const std::string & | defaultValue = "" | |||
| ) |
| void osg::ApplicationUsage::addEnvironmentalVariable | ( | const std::string & | option, | |
| const std::string & | explanation, | |||
| const std::string & | defaultValue = "" | |||
| ) |
| void osg::ApplicationUsage::addKeyboardMouseBinding | ( | const std::string & | option, | |
| const std::string & | explanation | |||
| ) |
| void osg::ApplicationUsage::addUsageExplanation | ( | Type | type, | |
| const std::string & | option, | |||
| const std::string & | explanation | |||
| ) |
| const std::string& osg::ApplicationUsage::getApplicationName | ( | ) | const [inline] |
| const UsageMap& osg::ApplicationUsage::getCommandLineOptions | ( | ) | const [inline] |
| const UsageMap& osg::ApplicationUsage::getCommandLineOptionsDefaults | ( | ) | const [inline] |
| const std::string& osg::ApplicationUsage::getCommandLineUsage | ( | ) | const [inline] |
| const std::string& osg::ApplicationUsage::getDescription | ( | ) | const [inline] |
| const UsageMap& osg::ApplicationUsage::getEnvironmentalVariables | ( | ) | const [inline] |
| const UsageMap& osg::ApplicationUsage::getEnvironmentalVariablesDefaults | ( | ) | const [inline] |
| void osg::ApplicationUsage::getFormattedString | ( | std::string & | str, | |
| const UsageMap & | um, | |||
| unsigned int | widthOfOutput = 80, |
|||
| bool | showDefaults = false, |
|||
| const UsageMap & | ud = UsageMap() | |||
| ) |
| const UsageMap& osg::ApplicationUsage::getKeyboardMouseBindings | ( | ) | const [inline] |
| static ApplicationUsage* osg::ApplicationUsage::instance | ( | ) | [static] |
| void osg::ApplicationUsage::setApplicationName | ( | const std::string & | name | ) | [inline] |
| void osg::ApplicationUsage::setCommandLineOptions | ( | const UsageMap & | usageMap | ) | [inline] |
| void osg::ApplicationUsage::setCommandLineOptionsDefaults | ( | const UsageMap & | usageMap | ) | [inline] |
| void osg::ApplicationUsage::setCommandLineUsage | ( | const std::string & | explanation | ) | [inline] |
| void osg::ApplicationUsage::setDescription | ( | const std::string & | desc | ) | [inline] |
| void osg::ApplicationUsage::setEnvironmentalVariables | ( | const UsageMap & | usageMap | ) | [inline] |
| void osg::ApplicationUsage::setEnvironmentalVariablesDefaults | ( | const UsageMap & | usageMap | ) | [inline] |
| void osg::ApplicationUsage::setKeyboardMouseBindings | ( | const UsageMap & | usageMap | ) | [inline] |
| void osg::ApplicationUsage::write | ( | std::ostream & | output, | |
| unsigned int | type = COMMAND_LINE_OPTION, |
|||
| unsigned int | widthOfOutput = 80, |
|||
| bool | showDefaults = false | |||
| ) |
| void osg::ApplicationUsage::write | ( | std::ostream & | output, | |
| const UsageMap & | um, | |||
| unsigned int | widthOfOutput = 80, |
|||
| bool | showDefaults = false, |
|||
| const UsageMap & | ud = UsageMap() | |||
| ) |
| void osg::ApplicationUsage::writeEnvironmentSettings | ( | std::ostream & | output | ) |
std::string osg::ApplicationUsage::_applicationName [protected] |
UsageMap osg::ApplicationUsage::_commandLineOptions [protected] |
std::string osg::ApplicationUsage::_commandLineUsage [protected] |
std::string osg::ApplicationUsage::_description [protected] |
UsageMap osg::ApplicationUsage::_keyboardMouse [protected] |
1.4.7