dlugolecki.net.pl
Dziennik
Polecane
Software
projects
/
command.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add code climate initial configuration
[command.git]
/
include
/
required.h
diff --git
a/include/required.h
b/include/required.h
index bdb629983c5b7504e160c10b031e4e566be3f893..f88d2ae15051c3a9bf71949ba7ba90b7c661dc9d 100644
(file)
--- a/
include/required.h
+++ b/
include/required.h
@@
-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();
}
/**
*/
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);
*/
virtual bool understand(const std::string & value) {
return parameter->understand(value);
@@
-50,18
+53,33
@@
namespace command {
/**
* Indicates if current Parameter is required
/**
* 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;
};
/**
*/
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();
*/
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 */