From 96637468dcaa5a22ba9c9e29541775e393c0bcd6 Mon Sep 17 00:00:00 2001 From: zawz Date: Thu, 29 Aug 2019 17:50:19 +0200 Subject: [PATCH] options: added option_sequence --- include/options.hpp | 14 +++++++++++--- src/options.cpp | 21 +++++++++++++++++---- 2 files changed, 28 insertions(+), 7 deletions(-) diff --git a/include/options.hpp b/include/options.hpp index 12351e6..aad170f 100644 --- a/include/options.hpp +++ b/include/options.hpp @@ -100,13 +100,18 @@ namespace ztd //! @brief Set of POSIX/GNU style options /*! Process arguments through it to extract options + + After processing: + - for global option settings use find() or parse option_vec + - for sequential option settings parse option_sequence + */ class option_set { public: /*CREATION FUNCTIONS*/ //! @brief Add option to the set - inline void add(option opt) { m_options.push_back(opt); } + inline void add(option opt) { option_vec.push_back(opt); } /*PRINT FUNCTIONS*/ //! @brief Print help for the full option set @@ -138,8 +143,11 @@ namespace ztd */ inline std::vector process(int argc, char** argv) { return this->process(ztd::argVector(argc, argv)); } - private: - std::vector