Add descriptive behaviour for command arguments.
authorRafał Długołęcki <rafal@dlugolecki.net.pl>
Tue, 21 Apr 2015 22:35:08 +0000 (00:35 +0200)
committerRafał Długołęcki <rafal@dlugolecki.net.pl>
Tue, 21 Apr 2015 22:35:08 +0000 (00:35 +0200)
include/descriptive.h [new file with mode: 0644]

diff --git a/include/descriptive.h b/include/descriptive.h
new file mode 100644 (file)
index 0000000..d93c931
--- /dev/null
@@ -0,0 +1,33 @@
+#ifndef __COMMAND_DESCRIPTIVE_H
+#define __COMMAND_DESCRIPTIVE_H
+
+#include <string>
+
+namespace command {
+    /**
+     * Descriptive behaviour class.
+     */
+    class Descriptive {
+        std::string description;
+    public:
+        /**
+         * Default constructor.
+         *
+         * @param description Description
+         */
+        Descriptive(std::string description)
+            : description(description) {
+        }
+
+        /**
+         * Returns description of the current class.
+         *
+         * @return provided description for the class
+         */
+        std::string describe() {
+            return description;
+        }
+    };
+}
+
+#endif /* __COMMAND_DESCRIPTIVE_H */