-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommandLine.H
More file actions
35 lines (33 loc) · 998 Bytes
/
CommandLine.H
File metadata and controls
35 lines (33 loc) · 998 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/***********************************************************************
CommandLine.H
BOOM : Bioinformatics Object Oriented Modules
Copyright (C)2012 William H. Majoros (martiandna@gmail.com).
This is OPEN SOURCE SOFTWARE governed by the Gnu General Public
License (GPL) version 3, as described at www.opensource.org.
***********************************************************************/
#ifndef INCL_BOOM_CommandLine_H
#define INCL_BOOM_CommandLine_H
#include "Vector.H"
#include "String.H"
#include "Map.H"
using namespace std;
namespace BOOM {
class CommandLine
{
public:
CommandLine(int argc,char *argv[],const char *options);
BOOM::String arg(int);
BOOM::String optParm(char);
bool option(char);
int numArgs();
private:
int argc;
char **argv;
BOOM::Vector<BOOM::String> args;
BOOM::Map<char,bool> usedOption;
BOOM::Map<char,BOOM::String> optionParm;
bool takesParameter(char c,const char *options);
void loopThroughOptions(const char *options);
};
}
#endif