From: Rafał Długołęcki Date: Tue, 21 Apr 2015 22:35:08 +0000 (+0200) Subject: Add descriptive behaviour for command arguments. X-Git-Tag: v0.2~47 X-Git-Url: https://git.dlugolecki.net.pl/?a=commitdiff_plain;h=995039163b27983555d71ec9ad8cecf4e70fd229;p=command.git Add descriptive behaviour for command arguments. --- diff --git a/include/descriptive.h b/include/descriptive.h new file mode 100644 index 0000000..d93c931 --- /dev/null +++ b/include/descriptive.h @@ -0,0 +1,33 @@ +#ifndef __COMMAND_DESCRIPTIVE_H +#define __COMMAND_DESCRIPTIVE_H + +#include + +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 */