diff options
Diffstat (limited to 'CCommandLine.h')
| -rw-r--r-- | CCommandLine.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/CCommandLine.h b/CCommandLine.h new file mode 100644 index 0000000..899a875 --- /dev/null +++ b/CCommandLine.h | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | /* | ||
| 2 | This file is a part of "Didrole's Update Tool" | ||
| 3 | ©2k12, Didrole | ||
| 4 | |||
| 5 | License : Public domain | ||
| 6 | */ | ||
| 7 | |||
| 8 | #pragma once | ||
| 9 | |||
| 10 | class CCommandLine | ||
| 11 | { | ||
| 12 | public: | ||
| 13 | CCommandLine(int argc, char **argv); | ||
| 14 | ~CCommandLine(); | ||
| 15 | |||
| 16 | const char* ParmValue(const char *psz, const char *pDefaultVal = 0) const; | ||
| 17 | int ParmValue(const char *psz, int nDefaultVal) const; | ||
| 18 | |||
| 19 | unsigned int ParmCount() const; | ||
| 20 | unsigned int FindParm(const char *psz) const; | ||
| 21 | const char* GetParm(unsigned int nIndex) const; | ||
| 22 | |||
| 23 | void AddParm(const char *psz); | ||
| 24 | |||
| 25 | private: | ||
| 26 | |||
| 27 | static const unsigned int k_nMaxArgs = 64; | ||
| 28 | |||
| 29 | int m_argc; | ||
| 30 | char *m_argv[k_nMaxArgs]; | ||
| 31 | }; | ||
