4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
5 // Competence Center NETwork research (NET), St. Augustin, GERMANY
6 // Stefan Bund <g0dil@berlios.de>
8 // This program is free software; you can redistribute it and/or modify
9 // it under the terms of the GNU General Public License as published by
10 // the Free Software Foundation; either version 2 of the License, or
11 // (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU General Public License for more details.
18 // You should have received a copy of the GNU General Public License
19 // along with this program; if not, write to the
20 // Free Software Foundation, Inc.,
21 // 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
24 \brief STLSupport public header */
26 #ifndef HH_SENF_Utils_Console_STLSupport_
27 #define HH_SENF_Utils_Console_STLSupport_ 1
34 //#include "STLSupport.mpp"
35 #include "STLSupport.ih"
36 ///////////////////////////////hh.p////////////////////////////////////////
43 template <class T, class Alloc>
44 struct ArgumentTraits< std::vector<T,Alloc> >
45 : public detail::CollectionArgumentTraits< std::vector<T,Alloc>,
46 detail::PushBackFunctor >
49 template <class T, class Alloc>
50 struct ReturnValueTraits< std::vector<T,Alloc> >
51 : public detail::CollectionReturnValueTraits< std::vector<T,Alloc> >
54 template <class T, class Alloc>
55 struct ArgumentTraits< std::list<T,Alloc> >
56 : public detail::CollectionArgumentTraits< std::list<T,Alloc>,
57 detail::PushBackFunctor >
60 template <class T, class Alloc>
61 struct ReturnValueTraits< std::list<T,Alloc> >
62 : public detail::CollectionReturnValueTraits< std::list<T,Alloc> >
65 template <class Key, class Compare, class Alloc>
66 struct ArgumentTraits< std::set<Key,Compare,Alloc> >
67 : public detail::CollectionArgumentTraits< std::set<Key,Compare,Alloc>,
68 detail::InsertFunctor >
71 template <class Key, class Compare, class Alloc>
72 struct ReturnValueTraits< std::set<Key,Compare,Alloc> >
73 : public detail::CollectionReturnValueTraits< std::set<Key,Compare,Alloc> >
76 template <class Key, class Compare, class Alloc>
77 struct ArgumentTraits< std::multiset<Key,Compare,Alloc> >
78 : public detail::CollectionArgumentTraits< std::multiset<Key,Compare,Alloc>,
79 detail::InsertFunctor >
82 template <class Key, class Compare, class Alloc>
83 struct ReturnValueTraits< std::multiset<Key,Compare,Alloc> >
84 : public detail::CollectionReturnValueTraits< std::multiset<Key,Compare,Alloc> >
87 template <class Key, class Data, class Compare, class Alloc>
88 struct ArgumentTraits< std::map<Key,Data,Compare,Alloc> >
89 : public detail::MapArgumentTraits< std::map<Key,Data,Compare,Alloc> >
92 template <class Key, class Data, class Compare, class Alloc>
93 struct ReturnValueTraits< std::map<Key,Data,Compare,Alloc> >
94 : public detail::MapReturnValueTraits< std::map<Key,Data,Compare,Alloc> >
97 template <class Key, class Data, class Compare, class Alloc>
98 struct ArgumentTraits< std::multimap<Key,Data,Compare,Alloc> >
99 : public detail::MapArgumentTraits< std::multimap<Key,Data,Compare,Alloc> >
102 template <class Key, class Data, class Compare, class Alloc>
103 struct ReturnValueTraits< std::multimap<Key,Data,Compare,Alloc> >
104 : public detail::MapReturnValueTraits< std::multimap<Key,Data,Compare,Alloc> >
107 template <class T1, class T2>
108 struct ArgumentTraits< std::pair<T1,T2> >
110 typedef std::pair<T1,T2> type;
111 static bool const singleToken = false;
113 static void parse(ParseCommandInfo::TokensRange const & tokens, type & out);
114 static std::string description();
115 static std::string str(type const & value);
118 template <class T1, class T2>
119 struct ReturnValueTraits< std::pair<T1,T2> >
121 typedef std::pair<T1,T2> type;
123 static void format(type const & value, std::ostream & os);
130 ///////////////////////////////hh.e////////////////////////////////////////
131 //#include "STLSupport.cci"
132 #include "STLSupport.ct"
133 #include "STLSupport.cti"
140 // comment-column: 40
141 // c-file-style: "senf"
142 // indent-tabs-mode: nil
143 // ispell-local-dictionary: "american"
144 // compile-command: "scons -u test"