00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00026 #ifndef IH_SENF_senf_Utils_Console_STLSupport_
00027 #define IH_SENF_senf_Utils_Console_STLSupport_ 1
00028
00029
00030
00031
00032
00033 namespace senf {
00034 namespace console {
00035 namespace detail {
00036
00037 template <class Collection>
00038 struct CollectionArgumentTraitsBase
00039 {
00040 typedef Collection type;
00041 static bool const singleToken = false;
00042
00043 static std::string description();
00044 static std::string str(Collection const & value);
00045 };
00046
00047 template <class Collection, class Adder>
00048 struct CollectionArgumentTraits
00049 : detail::CollectionArgumentTraitsBase<Collection>
00050 {
00051 static void parse(ParseCommandInfo::TokensRange const & tokens, Collection & out);
00052 };
00053
00054 template <class Collection>
00055 struct CollectionReturnValueTraits
00056 {
00057 typedef Collection type;
00058
00059 static void format(Collection const & value, std::ostream & os);
00060 };
00061
00062 struct PushBackFunctor
00063 {
00064 template <class Sequence, class ValueType>
00065 static void add(Sequence & seq, ValueType const & value);
00066 };
00067
00068 struct InsertFunctor
00069 {
00070 template <class Collection, class ValueType>
00071 static void add(Collection & seq, ValueType const & value);
00072 };
00073
00074 template <class Collection>
00075 struct MapArgumentTraits
00076 {
00077 typedef Collection type;
00078 static bool const singleToken = false;
00079
00080 static void parse(ParseCommandInfo::TokensRange const & tokens, Collection & out);
00081 static std::string description();
00082 static std::string str(Collection const & value);
00083 };
00084
00085 template <class Collection>
00086 struct MapReturnValueTraits
00087 {
00088 typedef Collection type;
00089
00090 static void format(Collection const & value, std::ostream & os);
00091 };
00092
00093 }}}
00094
00095
00096 #endif
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107