ptypes

ptypes Commit Details


Date:2013-05-24 21:14:00 (11 years 7 months ago)
Author:Natalie Adams
Branch:default
Commit:06572458aab1
Parents: da6db760aa7b
Message:Updating ptypes header

Changes:
Minclude/ptypes.h (1 diff)
Mwin32/PTypes_Lib.vcxproj (1 diff)
Mwin32/PTypes_Lib.vcxproj.filters (1 diff)

File differences

include/ptypes.h
12001200
12011201
12021202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
12031247
12041248
12051249
};
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<Parameter> * paras;
tobjlist<char> argv;
tobjlist<char> invalidparas;
tobjlist<char> missingparas;
bool checkreq;
public:
pparser(int argc, char * argv[], const tobjlist<Parameter> & 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 ----------------------------- //
// -------------------------------------------------------------------- //
win32/PTypes_Lib.vcxproj
434434
435435
436436
437
437438
438439
439440
<AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<ClCompile Include="ppparser.cxx" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\include\pasync.h" />
win32/PTypes_Lib.vcxproj.filters
188188
189189
190190
191
192
193
191194
192195
193196
<ClCompile Include="..\src\ptparray.cxx">
<Filter>Types</Filter>
</ClCompile>
<ClCompile Include="ppparser.cxx">
<Filter>Types</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\include\pasync.h">

Archive Download the corresponding diff file

Branches

Tags

Page rendered in 0.64494s using 14 queries.