move header file to include/relpipe/cli/ v_0
authorFrantišek Kučera <franta-hg@frantovo.cz>
Sun, 12 Aug 2018 12:32:39 +0200
branchv_0
changeset 1 b498c00cc32f
parent 0 00d1dd4f816a
child 2 117e4145fff8
move header file to include/relpipe/cli/
CLI.cpp
CLI.h
include/relpipe/cli/CLI.h
nbproject/configurations.xml
--- a/CLI.cpp	Sun Aug 12 12:26:16 2018 +0200
+++ b/CLI.cpp	Sun Aug 12 12:32:39 2018 +0200
@@ -4,4 +4,4 @@
  * Compilation just validates that the .h file has no severe bugs.
  * In future, the binary might contain some code for testing purposes.
  */
-#include "CLI.h"
+#include "include/relpipe/cli/CLI.h"
--- a/CLI.h	Sun Aug 12 12:26:16 2018 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +0,0 @@
-#pragma once
-
-#include <locale.h>
-#include <string>
-#include <vector>
-#include <sstream>
-#include <locale>
-#include <codecvt>
-
-using namespace std;
-
-namespace relpipe {
-namespace cli {
-
-/**
- * TODO: move to relpipe-lib-cli (a common header-only library)
- */
-class CLI {
-public:
-
-	CLI(int argc, char* argv[]) {
-		setlocale(LC_ALL, "");
-
-		this->argc = &argc;
-		this->argv = &argv;
-
-		program = convertor.from_bytes(argv[0]);
-
-		for (int i = 1; i < argc; i++) {
-			args.insert(args.end(), convertor.from_bytes(argv[i]));
-		}
-
-	}
-
-	CLI(const CLI& orig) {
-	}
-
-	virtual ~CLI() {
-	}
-
-	const wstring programName() {
-		return (const wstring) program;
-	}
-
-	const vector<wstring> arguments() {
-		return (const vector<wstring>)args;
-	}
-
-	static const int EXIT_CODE_SUCCESS = 0;
-	static const int EXIT_CODE_UNEXPECTED_ERROR = 1;
-	static const int EXIT_CODE_BAD_SYNTAX = 3;
-	static const int EXIT_CODE_UNKNOWN_COMMAND = 4;
-	static const int EXIT_CODE_DATA_ERROR = 5;
-
-private:
-	int* argc;
-	char*** argv;
-	wstring program;
-	vector<wstring> args;
-	wstring_convert<codecvt_utf8<wchar_t>> convertor; // TODO: support also other encodings.
-};
-
-}
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/include/relpipe/cli/CLI.h	Sun Aug 12 12:32:39 2018 +0200
@@ -0,0 +1,64 @@
+#pragma once
+
+#include <locale.h>
+#include <string>
+#include <vector>
+#include <sstream>
+#include <locale>
+#include <codecvt>
+
+using namespace std;
+
+namespace relpipe {
+namespace cli {
+
+/**
+ * TODO: move to relpipe-lib-cli (a common header-only library)
+ */
+class CLI {
+public:
+
+	CLI(int argc, char* argv[]) {
+		setlocale(LC_ALL, "");
+
+		this->argc = &argc;
+		this->argv = &argv;
+
+		program = convertor.from_bytes(argv[0]);
+
+		for (int i = 1; i < argc; i++) {
+			args.insert(args.end(), convertor.from_bytes(argv[i]));
+		}
+
+	}
+
+	CLI(const CLI& orig) {
+	}
+
+	virtual ~CLI() {
+	}
+
+	const wstring programName() {
+		return (const wstring) program;
+	}
+
+	const vector<wstring> arguments() {
+		return (const vector<wstring>)args;
+	}
+
+	static const int EXIT_CODE_SUCCESS = 0;
+	static const int EXIT_CODE_UNEXPECTED_ERROR = 1;
+	static const int EXIT_CODE_BAD_SYNTAX = 3;
+	static const int EXIT_CODE_UNKNOWN_COMMAND = 4;
+	static const int EXIT_CODE_DATA_ERROR = 5;
+
+private:
+	int* argc;
+	char*** argv;
+	wstring program;
+	vector<wstring> args;
+	wstring_convert<codecvt_utf8<wchar_t>> convertor; // TODO: support also other encodings.
+};
+
+}
+}
--- a/nbproject/configurations.xml	Sun Aug 12 12:26:16 2018 +0200
+++ b/nbproject/configurations.xml	Sun Aug 12 12:32:39 2018 +0200
@@ -4,7 +4,7 @@
     <logicalFolder name="HeaderFiles"
                    displayName="Header Files"
                    projectFiles="true">
-      <itemPath>CLI.h</itemPath>
+      <itemPath>include/relpipe/cli/CLI.h</itemPath>
     </logicalFolder>
     <logicalFolder name="ResourceFiles"
                    displayName="Resource Files"
@@ -39,7 +39,7 @@
       </compileType>
       <item path="CLI.cpp" ex="false" tool="1" flavor2="0">
       </item>
-      <item path="CLI.h" ex="false" tool="3" flavor2="0">
+      <item path="include/relpipe/cli/CLI.h" ex="false" tool="3" flavor2="0">
       </item>
     </conf>
     <conf name="Release" type="2">
@@ -64,7 +64,7 @@
       </compileType>
       <item path="CLI.cpp" ex="false" tool="1" flavor2="0">
       </item>
-      <item path="CLI.h" ex="false" tool="3" flavor2="0">
+      <item path="include/relpipe/cli/CLI.h" ex="false" tool="3" flavor2="0">
       </item>
     </conf>
   </confs>