00001
#ifndef PARSEUTIL_H
00002
#define PARSEUTIL_H
00003
00004
#include <string>
00005
#include <exception>
00006
#include <vector>
00007
00008
#include "common.h"
00009
00010 BOREALIS_NAMESPACE_BEGIN;
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 vector<string>
unpackString(
const string & src,
const string & delimiters);
00024
00025
00026
00027
00028
bool stringToBool(
const string & s)
00029
throw (exception);
00030
00031 size_t
stringToSize_t(
const string & s)
00032
throw (exception);
00033
00034
int stringToInt(
const string & s)
00035
throw (exception);
00036
00037
unsigned int stringToUInt(
const string & s)
00038
throw (exception);
00039
00040
long stringToLong(
const string & s)
00041
throw (exception);
00042
00043
unsigned long stringToULong(
const string & s)
00044
throw (exception);
00045
00046
unsigned long long stringToULongLong(
const string & s)
00047
throw (exception);
00048
00049
double stringToDouble(
const string & s)
00050
throw (exception);
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062 size_t
getArgUniqueIndex(string argname,
bool canBeLast,
int argc,
00063
const char * argv[])
00064
throw (exception);
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
double getUniqueDoubleArg(string argname,
00077
int argc,
const char * argv[],
00078
double minValue,
double maxValue)
00079
throw (exception);
00080
00081
00082
int getUniqueIntArg(string argname,
00083
int argc,
const char * argv[],
00084
int minValue,
int maxValue)
00085
throw (exception);
00086
00087
00088 string
getUniqueStringArg(string argname,
00089
int argc,
00090
const char * argv[])
00091
throw (exception);
00092
00093
00094
00095
00096
00097
00098
bool argInCmdLine(string argumentName,
00099
int argc,
const char * argv[]);
00100
00101 BOREALIS_NAMESPACE_END;
00102
00103
#endif