| 1 |
/* |
| 2 |
Copyright (C) 2002 Kai Sterker <[email protected]> |
| 3 |
Part of the Adonthell Project <http://adonthell.nongnu.org> |
| 4 |
|
| 5 |
Dlgedit is free software; you can redistribute it and/or modify |
| 6 |
it under the terms of the GNU General Public License as published by |
| 7 |
the Free Software Foundation; either version 2 of the License, or |
| 8 |
(at your option) any later version. |
| 9 |
|
| 10 |
Dlgedit is distributed in the hope that it will be useful, |
| 11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
GNU General Public License for more details. |
| 14 |
|
| 15 |
You should have received a copy of the GNU General Public License |
| 16 |
along with Dlgedit. If not, see <http://www.gnu.org/licenses/>. |
| 17 |
*/ |
| 18 |
|
| 19 |
/** |
| 20 |
* @file dlg_cmdline.h |
| 21 |
* |
| 22 |
* @author Kai Sterker |
| 23 |
* @brief Methods to parse the dlgedit commandline. |
| 24 |
*/ |
| 25 |
|
| 26 |
#ifndef DLG_CMDLINE_H |
| 27 |
#define DLG_CMDLINE_H |
| 28 |
|
| 29 |
#include <string> |
| 30 |
|
| 31 |
/** |
| 32 |
* Apart from the above, DlgCmdline stores the various options |
| 33 |
* that can be specified on the command line |
| 34 |
*/ |
| 35 |
class DlgCmdline |
| 36 |
{ |
| 37 |
public: |
| 38 |
/** |
| 39 |
* The method doing all the work. To be called right after |
| 40 |
* dlgedit is launched. |
| 41 |
* @param argc argument count |
| 42 |
* @param argv argument vector |
| 43 |
* @return <b>false</b> indicates that the program shall quit |
| 44 |
*/ |
| 45 |
static bool parse (int argc, char* argv[]); |
| 46 |
|
| 47 |
/** |
| 48 |
* The directory where dlgedit searches for projects. |
| 49 |
*/ |
| 50 |
static std::string datadir; |
| 51 |
|
| 52 |
/** |
| 53 |
* The project. This is the directory that contains the character- |
| 54 |
* and quest data dlgedit needs to (properly) compile dialogues |
| 55 |
* making use of advanced Python scripting features. |
| 56 |
*/ |
| 57 |
static std::string project; |
| 58 |
|
| 59 |
/** |
| 60 |
* This is set to <b>true</b> to indicate that only the dialogue |
| 61 |
* compiler should be run on the given sourcefiles, without launching |
| 62 |
* the GUI. After all files are compiled, dlgedit exits. |
| 63 |
*/ |
| 64 |
static bool compile; |
| 65 |
|
| 66 |
/** |
| 67 |
* The index in the argument vector pointing to the first non-option. |
| 68 |
* With a bit of luck, this is one or more dialogue sources. |
| 69 |
*/ |
| 70 |
static int sources; |
| 71 |
|
| 72 |
private: |
| 73 |
static void help (const std::string &program); |
| 74 |
}; |
| 75 |
|
| 76 |
#endif // DLG_CMDLINE_H |