Parameters.h
From Genome Analysis Wiki
Jump to navigationJump to searchParameters.h is a header file that defines a series of classes that are useful for processing command line parameters.
Example Usage
#include "Parameters.h"
int main(int argc, char ** argv)
{
int anInteger = 0, anotherInteger = 1;
double aDouble = 0.4321;
ParameterList pl;
pl.Add(new IntParameter('i', "Favorite Integer", anInteger));
pl.Add(new IntParameter('2', "Another Integer", anotherInteger));
pl.Add(new DoubleParameter('2', "Floating point value", aDouble));
pl.Read(argc, argv);
pl.Status();
}
Key Classes Declared
- ParameterList is the key class and is the class you will most often use in your own code
- IntParameter is a class for retrieving integers
- SwitchParameter is a class for retrieving on/off switches
- DoubleParameter is a class for retrieving double precision integers
- StringParameter is a class for manipulating strings
- LongParameter is a class for handling long option names
Dependencies
Depends on StringMap.h