diff -r da6db760aa7b0e7f6212a8fa6229c41e72cd41bb -r 06572458aab14515dd6112c12b523bbc81ce2985 include/ptypes.h --- a/include/ptypes.h Fri May 24 21:12:45 2013 -0500 +++ b/include/ptypes.h Fri May 24 21:14:49 2013 -0500 @@ -1200,6 +1200,50 @@ }; +class Parameter : public component +{ +public: + string longparameter; + string shortparameter; + int numberofparameters; + bool required; + string hint; + Parameter(string longpara, string shortpara, string hint, bool required = false, int numberofparameters = 0) + { + this->longparameter = longpara; + this->shortparameter = shortpara; + this->hint = hint; + this->required = required; + this->numberofparameters = numberofparameters; + } +}; + +class pparser +{ + private: + variant choices; + //char * argv; + tobjlist * paras; + tobjlist argv; + tobjlist invalidparas; + tobjlist missingparas; + bool checkreq; + public: + pparser(int argc, char * argv[], const tobjlist & parameters); + + void printusage(const char * header, const char * pname, const char * footer); + + // Checks to make sure all required parameters are set + bool check() { return this->checkreq; } + + // Returns true if parameter is set + bool isparameterset(const Parameter * para); + + // Gets an array of variants of all the options to the parameters + // A variant will make it easier to convert to an int or another type + variant getoptions(const Parameter * para); +}; + // -------------------------------------------------------------------- // // --- pre-2.0 compatibility declarations ----------------------------- // // -------------------------------------------------------------------- // diff -r da6db760aa7b0e7f6212a8fa6229c41e72cd41bb -r 06572458aab14515dd6112c12b523bbc81ce2985 win32/PTypes_Lib.vcxproj --- a/win32/PTypes_Lib.vcxproj Fri May 24 21:12:45 2013 -0500 +++ b/win32/PTypes_Lib.vcxproj Fri May 24 21:14:49 2013 -0500 @@ -434,6 +434,7 @@ %(AdditionalIncludeDirectories) %(PreprocessorDefinitions) + diff -r da6db760aa7b0e7f6212a8fa6229c41e72cd41bb -r 06572458aab14515dd6112c12b523bbc81ce2985 win32/PTypes_Lib.vcxproj.filters --- a/win32/PTypes_Lib.vcxproj.filters Fri May 24 21:12:45 2013 -0500 +++ b/win32/PTypes_Lib.vcxproj.filters Fri May 24 21:14:49 2013 -0500 @@ -188,6 +188,9 @@ Types + + Types +