Add Grouped behaviour.
[command.git] / include / required.h
index bdb629983c5b7504e160c10b031e4e566be3f893..f88d2ae15051c3a9bf71949ba7ba90b7c661dc9d 100644 (file)
@@ -32,17 +32,20 @@ namespace command {
         }
 
         /**
-         * Method used for handling method calls to linked Parameter
+         * Wrapper method around passed Parameter::handle().
+         *
+         * \inheritdoc
          */
         virtual void handle() {
             parameter->handle();
         }
 
         /**
-         * Method used for checking if the given user value is understandable by
-         * parameter.
+         * Wrapper method around passed Parameter::understand()
+         *
+         * @param argv command line value against which test will be made
          *
-         * @param value value from argv to check against
+         * \inheritdoc
          */
         virtual bool understand(const std::string & value) {
             return parameter->understand(value);
@@ -50,18 +53,33 @@ namespace command {
 
         /**
          * Indicates if current Parameter is required
+         *
+         * @return true, as all Parameters wrapped in Required class are set as
+         *      required. In order to make them non-required do not use
+         *      Required class
          */
         virtual bool isRequired() {
             return true;
         };
 
         /**
-         * Indicates if current Parameter is already used
+         * Wrapper method around passed Parameter::isUsed().
+         *
+         * \inheritdoc
          */
         virtual bool isUsed() {
             return parameter->isUsed();
-        };
+        }
+
+        /**
+         * Wrapper method around passed Parameter::valuePosition().
+         *
+         * \inheritdoc
+         */
+        virtual unsigned int valuePosition(const std::string & value) {
+            return parameter->valuePosition(value);
+        }
     };
 }
 
-#endif /* __COMMAND_PARAMETER_H */
+#endif /* __COMMAND_REQUIRED_H */