Add possibility to set MultiValue Options.
[command.git] / include / option.h
index 59de3957b9d9f97cdfb651b57b470ce03dc057b6..260659e6847efbe8466c7e3c4ab997ebfe48d477 100644 (file)
@@ -108,6 +108,13 @@ namespace command {
             }
             return false;
         }
+
+        /**
+         * \inheritdoc
+         */
+        virtual unsigned int valuePosition(const std::string & argv) {
+            return argv.find("=");
+        }
     };
 
     /**
@@ -173,6 +180,13 @@ namespace command {
             }
             return false;
         }
+
+        /**
+         * \inheritdoc
+         */
+        virtual unsigned int valuePosition(const std::string & ) {
+            throw new std::invalid_argument(this->describe() + "is void Option, so it does not have value part");
+        }
     };
 }