00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00026 #ifndef HH_SENF_Utils_Console_STLSupport_
00027 #define HH_SENF_Utils_Console_STLSupport_ 1
00028
00029
00030 #include <vector>
00031 #include <list>
00032 #include "Traits.hh"
00033
00034
00035 #include "STLSupport.ih"
00036
00037
00038 namespace senf {
00039 namespace console {
00040
00041 #ifndef DOXYGEN
00042
00043 template <class T, class Alloc>
00044 struct ArgumentTraits< std::vector<T,Alloc> >
00045 : public detail::CollectionArgumentTraits< std::vector<T,Alloc>,
00046 detail::PushBackFunctor >
00047 {};
00048
00049 template <class T, class Alloc>
00050 struct ReturnValueTraits< std::vector<T,Alloc> >
00051 : public detail::CollectionReturnValueTraits< std::vector<T,Alloc> >
00052 {};
00053
00054 template <class T, class Alloc>
00055 struct ArgumentTraits< std::list<T,Alloc> >
00056 : public detail::CollectionArgumentTraits< std::list<T,Alloc>,
00057 detail::PushBackFunctor >
00058 {};
00059
00060 template <class T, class Alloc>
00061 struct ReturnValueTraits< std::list<T,Alloc> >
00062 : public detail::CollectionReturnValueTraits< std::list<T,Alloc> >
00063 {};
00064
00065 template <class Key, class Compare, class Alloc>
00066 struct ArgumentTraits< std::set<Key,Compare,Alloc> >
00067 : public detail::CollectionArgumentTraits< std::set<Key,Compare,Alloc>,
00068 detail::InsertFunctor >
00069 {};
00070
00071 template <class Key, class Compare, class Alloc>
00072 struct ReturnValueTraits< std::set<Key,Compare,Alloc> >
00073 : public detail::CollectionReturnValueTraits< std::set<Key,Compare,Alloc> >
00074 {};
00075
00076 template <class Key, class Compare, class Alloc>
00077 struct ArgumentTraits< std::multiset<Key,Compare,Alloc> >
00078 : public detail::CollectionArgumentTraits< std::multiset<Key,Compare,Alloc>,
00079 detail::InsertFunctor >
00080 {};
00081
00082 template <class Key, class Compare, class Alloc>
00083 struct ReturnValueTraits< std::multiset<Key,Compare,Alloc> >
00084 : public detail::CollectionReturnValueTraits< std::multiset<Key,Compare,Alloc> >
00085 {};
00086
00087 template <class Key, class Data, class Compare, class Alloc>
00088 struct ArgumentTraits< std::map<Key,Data,Compare,Alloc> >
00089 : public detail::MapArgumentTraits< std::map<Key,Data,Compare,Alloc> >
00090 {};
00091
00092 template <class Key, class Data, class Compare, class Alloc>
00093 struct ReturnValueTraits< std::map<Key,Data,Compare,Alloc> >
00094 : public detail::MapReturnValueTraits< std::map<Key,Data,Compare,Alloc> >
00095 {};
00096
00097 template <class Key, class Data, class Compare, class Alloc>
00098 struct ArgumentTraits< std::multimap<Key,Data,Compare,Alloc> >
00099 : public detail::MapArgumentTraits< std::multimap<Key,Data,Compare,Alloc> >
00100 {};
00101
00102 template <class Key, class Data, class Compare, class Alloc>
00103 struct ReturnValueTraits< std::multimap<Key,Data,Compare,Alloc> >
00104 : public detail::MapReturnValueTraits< std::multimap<Key,Data,Compare,Alloc> >
00105 {};
00106
00107 template <class T1, class T2>
00108 struct ArgumentTraits< std::pair<T1,T2> >
00109 {
00110 typedef std::pair<T1,T2> type;
00111 static bool const singleToken = false;
00112
00113 static void parse(ParseCommandInfo::TokensRange const & tokens, type & out);
00114 static std::string description();
00115 static std::string str(type const & value);
00116 };
00117
00118 template <class T1, class T2>
00119 struct ReturnValueTraits< std::pair<T1,T2> >
00120 {
00121 typedef std::pair<T1,T2> type;
00122
00123 static void format(type const & value, std::ostream & os);
00124 };
00125
00126 #endif
00127
00128 }}
00129
00130
00131
00132 #include "STLSupport.ct"
00133 #include "STLSupport.cti"
00134 #endif
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145