Added the usage report to the examples for when no arguments are passed

to the examples.
This commit is contained in:
Robert Osfield
2003-04-06 21:32:44 +00:00
parent 908164d58a
commit 49a28660dc
40 changed files with 166 additions and 72 deletions

View File

@@ -43,9 +43,9 @@ class SG_EXPORT ApplicationUsage
enum Type
{
COMMAND_LINE_OPTION,
ENVIRONMENTAL_VARIABLE,
KEYBOARD_MOUSE_BINDING
COMMAND_LINE_OPTION = 0x1,
ENVIRONMENTAL_VARIABLE = 0x2,
KEYBOARD_MOUSE_BINDING = 0x4
};
void addUsageExplanation(Type type,const std::string& option,const std::string& explanation);
@@ -74,7 +74,7 @@ class SG_EXPORT ApplicationUsage
void write(std::ostream& output,const UsageMap& um,unsigned int widthOfOutput=80);
void write(std::ostream& output,unsigned int widthOfOutput=80);
void write(std::ostream& output,unsigned int type=COMMAND_LINE_OPTION|ENVIRONMENTAL_VARIABLE|KEYBOARD_MOUSE_BINDING, unsigned int widthOfOutput=80);
protected:

View File

@@ -46,8 +46,8 @@ class SG_EXPORT ArgumentParser
/** return const char* argument at specificed position.*/
const char* operator [] (int pos) const { return _argv[pos]; }
/** return the program name, as specified by argv[0] */
std::string getProgramName() const;
/** return the application name, as specified by argv[0] */
std::string getApplicationName() const;
/** return the position of an occurance of a string in the argument list.
* return -1 when no string is found.*/