]> Dogcows Code - chaz/yoink/blob - src/stlplus/strings/string_digraph.tpp
build system enhancements
[chaz/yoink] / src / stlplus / strings / string_digraph.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 "string_sequence.hpp"
10
11 namespace stlplus
12 {
13
14 ////////////////////////////////////////////////////////////////////////////////
15
16 template<typename NT, typename AT, typename NS, typename AS>
17 std::string digraph_to_string(const digraph<NT,AT>& values,
18 NS node_to_string_fn,
19 AS arc_to_string_fn,
20 const std::string& separator)
21 {
22 std::string result;
23 result += "nodes:";
24 result += separator;
25 result += sequence_to_string(values.begin(), values.end(), node_to_string_fn, separator);
26 result += "arcs:";
27 result += separator;
28 result += sequence_to_string(values.arc_begin(), values.arc_end(), arc_to_string_fn, separator);
29 return result;
30 }
31
32 } // end namespace stlplus
33
This page took 0.031619 seconds and 4 git commands to generate.