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