# osg::ApplicationUsage Class Reference

List of all members.

## Public Types

typedef std::map< std::string, std::string > | UsageMap
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="")
const UsageMap & | getCommandLineOptions () const
const UsageMap & | getCommandLineOptionsDefaults () const
void | addEnvironmentalVariable (const std::string &option, const std::string &explanation, const std::string &defaultValue="")
const UsageMap & | getEnvironmentalVariables () const
const UsageMap & | getEnvironmentalVariablesDefaults () const
void | addKeyboardMouseBinding (const std::string &option, const std::string &explanation)
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)

## 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

## Member Typedef Documentation

typedef std::map<std::string,std::string> osg::ApplicationUsage::UsageMap

## Member Enumeration Documentation

enum osg::ApplicationUsage::Type

Enumeration values:

  COMMAND_LINE_OPTION |
  ENVIRONMENTAL_VARIABLE |
  KEYBOARD_MOUSE_BINDING |

## Constructor & Destructor Documentation

osg::ApplicationUsage::ApplicationUsage | ( |  | ) | `[inline]`

ApplicationUsage::ApplicationUsage | ( | const std::string & | commandLineUsage | ) |

## Member Function Documentation

void ApplicationUsage::addCommandLineOption | ( | const std::string & | option,
|  | const std::string & | explanation,
|  | const std::string & | defaultValue = `""`
| ) |

void ApplicationUsage::addEnvironmentalVariable | ( | const std::string & | option,
|  | const std::string & | explanation,
|  | const std::string & | defaultValue = `""`
| ) |

void ApplicationUsage::addKeyboardMouseBinding | ( | const std::string & | option,
|  | const std::string & | explanation
| ) |

void 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 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]`

ApplicationUsage * ApplicationUsage::instance | ( |  | ) | `[static]`

void osg::ApplicationUsage::setApplicationName | ( | const std::string & | name | ) | `[inline]`

void osg::ApplicationUsage::setCommandLineUsage | ( | const std::string & | explanation | ) | `[inline]`

void osg::ApplicationUsage::setDescription | ( | const std::string & | desc | ) | `[inline]`

void ApplicationUsage::write | ( | std::ostream & | output,
|  | unsigned int | type = `COMMAND_LINE_OPTION`,
|  | unsigned int | widthOfOutput = `80`,
|  | bool | showDefaults = `false`
| ) |

void ApplicationUsage::write | ( | std::ostream & | output,
|  | const UsageMap & | um,
|  | unsigned int | widthOfOutput = `80`,
|  | bool | showDefaults = `false`,
|  | const UsageMap & | ud = `UsageMap()`
| ) |

## Member Data Documentation

std::string osg::ApplicationUsage::_applicationName `[protected]`

UsageMap osg::ApplicationUsage::_commandLineOptions `[protected]`

UsageMap osg::ApplicationUsage::_commandLineOptionsDefaults `[protected]`

std::string osg::ApplicationUsage::_commandLineUsage `[protected]`

std::string osg::ApplicationUsage::_description `[protected]`

UsageMap osg::ApplicationUsage::_environmentalVariables `[protected]`

UsageMap osg::ApplicationUsage::_environmentalVariablesDefaults `[protected]`

UsageMap osg::ApplicationUsage::_keyboardMouse `[protected]`

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

- ApplicationUsage
- ApplicationUsage.cpp