]> Dogcows Code - chaz/yoink/blob - src/stlplus/strings/print_map.tpp
testing new non-autotools build system
[chaz/yoink] / src / stlplus / strings / print_map.tpp
1 ////////////////////////////////////////////////////////////////////////////////
2
3 // Author: Andy Rushton
4 // Copyright: (c) Southampton University 1999-2004
5 // (c) Andy Rushton 2004-2009
6 // License: BSD License, see ../docs/license.html
7
8 ////////////////////////////////////////////////////////////////////////////////
9 #include "print_sequence.hpp"
10
11 namespace stlplus
12 {
13
14 ////////////////////////////////////////////////////////////////////////////////
15 // map
16
17 template<typename K, typename T, typename C, typename SK, typename ST>
18 void print_map(std::ostream& device, const std::map<K,T,C>& values,
19 SK key_print_fn,
20 ST value_print_fn,
21 const std::string& pair_separator,
22 const std::string& separator)
23 {
24 print_pair_sequence(values.begin(), values.end(),
25 key_print_fn, value_print_fn,
26 pair_separator, separator);
27 }
28
29 ////////////////////////////////////////////////////////////////////////////////
30 // multimap
31
32 template<typename K, typename T, typename C, typename SK, typename ST>
33 void print_multimap(std::ostream& device, const std::multimap<K,T,C>& values,
34 SK key_print_fn,
35 ST value_print_fn,
36 const std::string& pair_separator,
37 const std::string& separator)
38 {
39 print_pair_sequence(device,
40 values.begin(), values.end(),
41 key_print_fn, value_print_fn,
42 pair_separator, separator);
43 }
44
45 ////////////////////////////////////////////////////////////////////////////////
46 } // end namespace stlplus
This page took 0.036158 seconds and 4 git commands to generate.