1 //************************************************************************** 2 //** 3 //** ## ## ## ## ## #### #### ### ### 4 //** ## ## ## ## ## ## ## ## ## ## #### #### 5 //** ## ## ## ## ## ## ## ## ## ## ## ## ## ## 6 //** ## ## ######## ## ## ## ## ## ## ## ### ## 7 //** ### ## ## ### ## ## ## ## ## ## 8 //** # ## ## # #### #### ## ## 9 //** 10 //** $Id: args.h 4212 2010-04-03 20:13:36Z dj_jl $ 11 //** 12 //** Copyright (C) 1999-2010 Jānis Legzdiņš 13 //** 14 //** This program is free software; you can redistribute it and/or 15 //** modify it under the terms of the GNU General Public License 16 //** as published by the Free Software Foundation; either version 2 17 //** of the License, or (at your option) any later version. 18 //** 19 //** This program is distributed in the hope that it will be useful, 20 //** but WITHOUT ANY WARRANTY; without even the implied warranty of 21 //** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22 //** GNU General Public License for more details. 23 //** 24 //************************************************************************** 25 26 // HEADER FILES ------------------------------------------------------------ 27 28 // MACROS ------------------------------------------------------------------ 29 30 // TYPES ------------------------------------------------------------------- 31 32 class VArgs 33 { 34 private: 35 int Argc; 36 char** Argv; 37 38 void FindResponseFile(); 39 40 public: 41 void Init(int, char**); 42 Count()43 int Count() const 44 { 45 return Argc; 46 } 47 const char* operator[](int i) 48 { 49 return Argv[i]; 50 } 51 52 // Returns the position of the given parameter 53 // in the arg list (0 if not found). 54 int CheckParm(const char* check) const; 55 const char* CheckValue(const char* check) const; 56 }; 57 58 // PUBLIC FUNCTION PROTOTYPES ---------------------------------------------- 59 60 // PUBLIC DATA DECLARATIONS ------------------------------------------------ 61 62 extern VArgs GArgs; 63