X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=src%2Fstlplus%2Fstrings%2Fprint_sequence.hpp;fp=src%2Fstlplus%2Fstrings%2Fprint_sequence.hpp;h=411ddd58b29e83c702eda3b44b5c8a1a1134b0c4;hb=6b0a0d0efafe34d48ab344fca3b479553bd4e62c;hp=0000000000000000000000000000000000000000;hpb=85783316365181491a3e3c0c63659972477cebba;p=chaz%2Fyoink diff --git a/src/stlplus/strings/print_sequence.hpp b/src/stlplus/strings/print_sequence.hpp new file mode 100644 index 0000000..411ddd5 --- /dev/null +++ b/src/stlplus/strings/print_sequence.hpp @@ -0,0 +1,46 @@ +#ifndef STLPLUS_PRINT_SEQUENCE +#define STLPLUS_PRINT_SEQUENCE +//////////////////////////////////////////////////////////////////////////////// + +// Author: Andy Rushton +// Copyright: (c) Southampton University 1999-2004 +// (c) Andy Rushton 2004-2009 +// License: BSD License, see ../docs/license.html + +// Generate string representations of sequences represented by forward iterators + +//////////////////////////////////////////////////////////////////////////////// +#include "strings_fixes.hpp" +#include +#include + +namespace stlplus +{ + + //////////////////////////////////////////////////////////////////////////////// + // any forward iterator sequence + + template + void print_sequence(std::ostream& device, + I begin, I end, + S print_fn, + const std::string& separator); + + + //////////////////////////////////////////////////////////////////////////////// + // any forward iterator sequence of pairs + + template + void print_pair_sequence(std::ostream& device, + I begin, I end, + S1 print_fn1, + S2 print_fn2, + const std::string& pair_separator, + const std::string& separator); + + //////////////////////////////////////////////////////////////////////////////// + +} // end namespace stlplus + +#include "print_sequence.tpp" +#endif