X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=utilities%2Fgengetopt%2Facceptedvalues.h;fp=utilities%2Fgengetopt%2Facceptedvalues.h;h=d6a3d080fdc09f27cd27364e83c4a17dfbf7690c;hb=79381bc54b9e0c85156460daa211fe5ac83da0a7;hp=0000000000000000000000000000000000000000;hpb=4454c06e212fb6af58d206f2d6f9b76778858967;p=clitk.git diff --git a/utilities/gengetopt/acceptedvalues.h b/utilities/gengetopt/acceptedvalues.h new file mode 100644 index 0000000..d6a3d08 --- /dev/null +++ b/utilities/gengetopt/acceptedvalues.h @@ -0,0 +1,40 @@ +// +// C++ Interface: acceptedvalues +// +// Description: +// +// +// Author: Lorenzo Bettini , (C) 2004 +// +// Copyright: See COPYING file that comes with this distribution +// +// +#ifndef ACCEPTEDVALUES_H +#define ACCEPTEDVALUES_H + +#include +#include +#include + +/** +the values that can be passed to an option + +@author Lorenzo Bettini +*/ +class AcceptedValues : protected std::list +{ + private: + typedef std::set value_set; + value_set values; + + public: + using std::list::const_iterator; + using std::list::begin; + using std::list::end; + + void insert(const std::string &s); + const std::string toString(bool escape = true) const; + bool contains(const std::string &s) const; +}; + +#endif