]> vaikene.ee Git - evaf/blob - src/main/CLI/main.h
Warning fixes and copyright update.
[evaf] / src / main / CLI / main.h
1 /**
2 * @file main/CLI/main.h
3 * @brief The main eVaf CLI application class
4 *
5 * Copyright (c) 2011 Enar Vaikene
6 *
7 * This file is part of the eVaf C++ cross-platform application development framework.
8 *
9 * This file can be used under the terms of the GNU General Public License
10 * version 3.0 as published by the Free Software Foundation and appearing in
11 * the file LICENSE included in the packaging of this file. Please review the
12 * the following information to ensure the GNU General Public License version
13 * 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
14 *
15 * Alternatively, this file may be used in accordance with the Commercial License
16 * Agreement provided with the Software.
17 */
18
19 #ifndef __CLI_MAIN_H
20 # define __CLI_MAIN_H
21
22 #include <QCoreApplication>
23
24 namespace eVaf {
25
26 /**
27 * The main eVaf command line interface (CLI) application.
28 *
29 * eVafGUI is the main CLI executable. It provides an empty CLI application
30 * that is used to load other eVaf modules.
31 */
32 namespace CLI {
33
34 /**
35 * Internal implementation of the main eVaf CLI application.
36 */
37 namespace Internal {
38 } // namespace eVaf::CLI::Internal
39
40 /**
41 * The main eVaf CLI application class
42 */
43 class Application : public QCoreApplication
44 {
45 Q_OBJECT
46
47 public:
48
49 Application(int & argc, char ** argv);
50
51 virtual ~Application();
52
53
54 public: // Static methods
55
56 /**
57 * Processes command-line arguments
58 * @param argc Number of command-line arguments
59 * @param argv List of command-line arguments
60 * @return True if ok; false if the application should terminate
61 *
62 * This function processes command-line arguments and should be called before running
63 * the application.
64 */
65 static bool processCommandLine(int argc, char ** argv);
66
67 /**
68 * Prints out help for command-line arguments.
69 */
70 static void printHelp();
71
72 /**
73 * Prints out help for Qt command-line arguments.
74 */
75 static void printQtHelp();
76
77 /**
78 * Prints out version information.
79 */
80 static void printVersion();
81
82 };
83
84 } // namespace eVaf::CLI
85 } // namespace eVaf
86
87 #endif // main.h