8 #ifndef ossimArgumentParser_HEADER 9 #define ossimArgumentParser_HEADER 1 45 theType = OSSIM_FLOAT_PARAMETER; theValue.theFloat = &value;
50 theType = OSSIM_DOUBLE_PARAMETER; theValue.theDouble = &value;
55 theType = OSSIM_INT_PARAMETER; theValue.theInt = &value;
60 theType = OSSIM_UNSIGNED_INT_PARAMETER; theValue.theUint = &value;
65 theType = OSSIM_STRING_PARAMETER; theValue.theString = &value;
70 theType = OSSIM_STRING_PARAMETER; theValue.theString =
74 bool valid(
const char* str)
const;
75 bool assign(
const char* str);
86 static bool isOption(
const char* str);
89 static bool isString(
const char* str);
92 static bool isNumber(
const char* str);
102 void initialize(
int* argc,
const char **argv);
109 int&
argc() {
return *theArgc; }
112 char**
argv() {
return theArgv; }
115 char* operator [] (
int pos) {
return theArgv[pos]; }
118 const char* operator [] (
int pos)
const {
return theArgv[pos]; }
121 std::string getApplicationName()
const;
125 int find(
const std::string& str)
const;
128 bool isOption(
int pos)
const;
131 bool isString(
int pos)
const;
134 bool isNumber(
int pos)
const;
136 bool containsOptions()
const;
139 void remove(
int pos,
int num=1);
146 bool match(
int pos,
const std::string& str)
const;
153 bool read(
const std::string& str);
154 bool read(
const std::string& str, ossimParameter value1);
155 bool read(
const std::string& str, ossimParameter value1,
156 ossimParameter value2);
157 bool read(
const std::string& str, ossimParameter value1,
158 ossimParameter value2, ossimParameter value3);
159 bool read(
const std::string& str, ossimParameter value1,
160 ossimParameter value2, ossimParameter value3,
161 ossimParameter value4);
162 bool read(
const std::string& str, ossimParameter value1,
163 ossimParameter value2, ossimParameter value3,
164 ossimParameter value4, ossimParameter value5);
165 bool read(
const std::string& str, ossimParameter value1,
166 ossimParameter value2, ossimParameter value3,
167 ossimParameter value4, ossimParameter value5,
168 ossimParameter value6);
181 bool read(
const std::string& str, std::vector<ossimString>& param_list);
187 int numberOfParams(
const std::string& str,
188 const ossimParameter value)
const;
195 bool read(
int pos,
const std::string& str);
196 bool read(
int pos,
const std::string& str, ossimParameter value1);
197 bool read(
int pos,
const std::string& str, ossimParameter value1,
198 ossimParameter value2);
199 bool read(
int pos,
const std::string& str, ossimParameter value1,
200 ossimParameter value2, ossimParameter value3);
201 bool read(
int pos,
const std::string& str, ossimParameter value1,
202 ossimParameter value2, ossimParameter value3,
203 ossimParameter value4);
221 void reportError(
const std::string& message,
225 void reportRemainingOptionsAsUnrecognized(
ossimParameterType theType
ossimParameter(ossimString &value)
ossimApplicationUsage * getApplicationUsage()
ossimParameter(unsigned int &value)
ossimParameter(int &value)
ossimParameter(float &value)
std::map< std::string, ossimErrorSeverity > ossimErrorMessageMap
ossimApplicationUsage * theUsage
ossimParameter(std::string &value)
ossimErrorMessageMap theErrorMessageMap
const ossimApplicationUsage * getApplicationUsage() const
char ** argv()
return the argument array.
ossimParameter(double &value)
void setApplicationUsage(ossimApplicationUsage *usage)
int & argc()
return the argument count.
std::basic_ostream< char > ostream
Base class for char output streams.
const std::string & string() const