Make code safer.
[command.git] / include / parameter.h
index 9e250869c1c7a95f6290cabf8926b718fe581ecc..a96128c407e50f226d417a8ac5b811cf3944eb7a 100644 (file)
@@ -8,8 +8,7 @@
 
 namespace command {
     /**
-     * Class responsible for handling commandline arguments.
-     * Arguments are required,x non-named parameters of program.
+     * Base class for all the Arguments and Options.
      *
      * Example:
      *  ./myprog ARGUMENT
@@ -22,14 +21,21 @@ namespace command {
          *
          * @param description Description of current Argument
          */
-        Parameter(std::string description)
+        Parameter(const std::string & description)
             : Descriptive(description) {
         }
         virtual ~Parameter() {}
 
-        virtual void handle() {
-            std::cout << "Parameter::handle()" << std::endl;
-        };
+        /**
+         * Method used for handling method calls linked with Argument or Option
+         */
+        virtual void handle() = 0;
+
+        /**
+         * Method used for checking if the given user value understandable for
+         * parameter.
+         */
+        virtual bool understand(const std::string & ) = 0;
     };
 }