4 // Fraunhofer Institute for Open Communication Systems (FOKUS)
6 // The contents of this file are subject to the Fraunhofer FOKUS Public License
7 // Version 1.0 (the "License"); you may not use this file except in compliance
8 // with the License. You may obtain a copy of the License at
9 // http://senf.berlios.de/license.html
11 // The Fraunhofer FOKUS Public License Version 1.0 is based on,
12 // but modifies the Mozilla Public License Version 1.1.
13 // See the full license text for the amendments.
15 // Software distributed under the License is distributed on an "AS IS" basis,
16 // WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
17 // for the specific language governing rights and limitations under the License.
19 // The Original Code is Fraunhofer FOKUS code.
21 // The Initial Developer of the Original Code is Fraunhofer-Gesellschaft e.V.
22 // (registered association), Hansastraße 27 c, 80686 Munich, Germany.
23 // All Rights Reserved.
26 // Stefan Bund <g0dil@berlios.de>
29 \brief STLSupport public header */
31 #ifndef HH_SENF_Utils_Console_STLSupport_
32 #define HH_SENF_Utils_Console_STLSupport_ 1
39 //#include "STLSupport.mpp"
40 #include "STLSupport.ih"
41 //-/////////////////////////////////////////////////////////////////////////////////////////////////
48 template <class T, class Alloc>
49 struct ArgumentTraits< std::vector<T,Alloc> >
50 : public detail::CollectionArgumentTraits< std::vector<T,Alloc>,
51 detail::PushBackFunctor >
54 template <class T, class Alloc>
55 struct ReturnValueTraits< std::vector<T,Alloc> >
56 : public detail::CollectionReturnValueTraits< std::vector<T,Alloc> >
59 template <class T, class Alloc>
60 struct ArgumentTraits< std::list<T,Alloc> >
61 : public detail::CollectionArgumentTraits< std::list<T,Alloc>,
62 detail::PushBackFunctor >
65 template <class T, class Alloc>
66 struct ReturnValueTraits< std::list<T,Alloc> >
67 : public detail::CollectionReturnValueTraits< std::list<T,Alloc> >
70 template <class Key, class Compare, class Alloc>
71 struct ArgumentTraits< std::set<Key,Compare,Alloc> >
72 : public detail::CollectionArgumentTraits< std::set<Key,Compare,Alloc>,
73 detail::InsertFunctor >
76 template <class Key, class Compare, class Alloc>
77 struct ReturnValueTraits< std::set<Key,Compare,Alloc> >
78 : public detail::CollectionReturnValueTraits< std::set<Key,Compare,Alloc> >
81 template <class Key, class Compare, class Alloc>
82 struct ArgumentTraits< std::multiset<Key,Compare,Alloc> >
83 : public detail::CollectionArgumentTraits< std::multiset<Key,Compare,Alloc>,
84 detail::InsertFunctor >
87 template <class Key, class Compare, class Alloc>
88 struct ReturnValueTraits< std::multiset<Key,Compare,Alloc> >
89 : public detail::CollectionReturnValueTraits< std::multiset<Key,Compare,Alloc> >
92 template <class Key, class Data, class Compare, class Alloc>
93 struct ArgumentTraits< std::map<Key,Data,Compare,Alloc> >
94 : public detail::MapArgumentTraits< std::map<Key,Data,Compare,Alloc> >
97 template <class Key, class Data, class Compare, class Alloc>
98 struct ReturnValueTraits< std::map<Key,Data,Compare,Alloc> >
99 : public detail::MapReturnValueTraits< std::map<Key,Data,Compare,Alloc> >
102 template <class Key, class Data, class Compare, class Alloc>
103 struct ArgumentTraits< std::multimap<Key,Data,Compare,Alloc> >
104 : public detail::MapArgumentTraits< std::multimap<Key,Data,Compare,Alloc> >
107 template <class Key, class Data, class Compare, class Alloc>
108 struct ReturnValueTraits< std::multimap<Key,Data,Compare,Alloc> >
109 : public detail::MapReturnValueTraits< std::multimap<Key,Data,Compare,Alloc> >
112 template <class T1, class T2>
113 struct ArgumentTraits< std::pair<T1,T2> >
115 typedef std::pair<T1,T2> type;
116 static bool const singleToken = false;
118 static void parse(ParseCommandInfo::TokensRange const & tokens, type & out);
119 static std::string description();
120 static std::string str(type const & value);
123 template <class T1, class T2>
124 struct ReturnValueTraits< std::pair<T1,T2> >
126 typedef std::pair<T1,T2> type;
128 static void format(type const & value, std::ostream & os);
135 //-/////////////////////////////////////////////////////////////////////////////////////////////////
136 //#include "STLSupport.cci"
137 #include "STLSupport.ct"
138 #include "STLSupport.cti"
145 // comment-column: 40
146 // c-file-style: "senf"
147 // indent-tabs-mode: nil
148 // ispell-local-dictionary: "american"
149 // compile-command: "scons -u test"