]> Dogcows Code - chaz/yoink/blob - src/stlplus/strings/print_ntree.tpp
cleanup stlplus files
[chaz/yoink] / src / stlplus / strings / print_ntree.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
10 namespace stlplus
11 {
12
13 template<typename T, typename S>
14 void print_ntree(std::ostream& device,
15 const ntree<T>& values,
16 S print_fn,
17 const std::string& separator,
18 const std::string& indent_string)
19 {
20 for (TYPENAME ntree<T>::const_prefix_iterator i = values.prefix_begin(); i != values.prefix_end(); i++)
21 {
22 if (i != values.prefix_begin()) device << separator;
23 for (unsigned indent = values.depth(i.simplify()); --indent; )
24 device << indent_string;
25 print_fn(device, *i);
26 }
27 }
28
29 } // end namespace stlplus
30
This page took 0.031345 seconds and 4 git commands to generate.