]> vaikene.ee Git - evaf/blobdiff - src/main/CLI/main.h
Added eVaf Command Line Interface application.
[evaf] / src / main / CLI / main.h
index 41ec6b504ce6b41c143b63262f51513f03992fac..97a123734eb82ccb0245c6aef1bec974716894b0 100644 (file)
@@ -1,5 +1,5 @@
 /**
- * @file main/cli/main.h
+ * @file main/CLI/main.h
  * @brief The main eVaf CLI application class
  *
  * Copyright (c) 2011 Enar Vaikene
  */
 
 #ifndef __CLI_MAIN_H
-#define __CLI_MAIN_H
+#  define __CLI_MAIN_H
 
 #include <QCoreApplication>
 
+namespace eVaf {
 
 /**
- * The main eVaf CLI application.
+ * The main eVaf command line interface (CLI) application.
  *
  * eVafGUI is the main CLI executable. It provides an empty CLI application
  * that is used to load other eVaf modules.
  */
-namespace eVafCLI {
+namespace CLI {
 
-} // namespace eVafCLI
+/**
+ * Internal implementation of the main eVaf CLI application.
+ */
+namespace Internal {
+} // namespace eVaf::CLI::Internal
+
+/**
+ * The main eVaf CLI application class
+ */
+class Application : public QCoreApplication
+{
+    Q_OBJECT
+
+public:
+
+    Application(int & argc, char ** argv);
+
+    virtual ~Application();
+
+
+public: // Static methods
+
+    /**
+     * Processes command-line arguments
+     * @param argc Number of command-line arguments
+     * @param argv List of command-line arguments
+     * @return True if ok; false if the application should terminate
+     *
+     * This function processes command-line arguments and should be called before running
+     * the application.
+     */
+    static bool processCommandLine(int argc, char ** argv);
+
+    /**
+     * Prints out help for command-line arguments.
+     */
+    static void printHelp();
+
+    /**
+     * Prints out help for Qt command-line arguments.
+     */
+    static void printQtHelp();
+
+    /**
+     * Prints out version information.
+     */
+    static void printVersion();
+
+};
+
+} // namespace eVaf::CLI
+} // namespace eVaf
 
 #endif // main.h