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 VectorSupport non-inline template implementation */
26 //#include "VectorSupport.ih"
31 ///////////////////////////////ct.p////////////////////////////////////////
35 template <class Sequence>
36 prefix_ void senf::console::SequenceArgumentTraits<Sequence>::
37 parse(ParseCommandInfo::TokensRange const & tokens, type & out)
40 CheckedArgumentIteratorWrapper arg (tokens);
42 out.push_back(typename Sequence::value_type());
43 senf::console::parse( *(arg++), out.back() );
47 template <class Sequence>
48 prefix_ std::string senf::console::SequenceArgumentTraits<Sequence>::description()
50 std::string type (prettyName(typeid(Sequence)));
51 std::string::size_type e (type.find('<'));
52 if (e == std::string::npos) e = type.size();
53 std::string::size_type b (type.rfind(':', e));
54 if (b == std::string::npos) b = 0; else ++b;
55 return type.substr(b,e-b) + "<"
56 + ArgumentTraits<typename Sequence::value_type>::description() + ">";
59 template <class Sequence>
60 prefix_ std::string senf::console::SequenceArgumentTraits<Sequence>::str(type const & value)
63 senf::console::format(value, ss);
67 template <class Sequence>
68 prefix_ void senf::console::SequenceReturnValueTraits<Sequence>::format(type const & value,
72 typename type::const_iterator i (value.begin());
73 typename type::const_iterator const i_end (value.end());
76 senf::console::format(*i, os);
87 ///////////////////////////////ct.e////////////////////////////////////////
95 // c-file-style: "senf"
96 // indent-tabs-mode: nil
97 // ispell-local-dictionary: "american"
98 // compile-command: "scons -u test"