X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fstlplus%2Fstrings%2Fprint_sequence.hpp;h=317fbf23a0c61a5d40f207fa66a98f688b2d7759;hp=411ddd58b29e83c702eda3b44b5c8a1a1134b0c4;hb=5846afb00833cc72fe72422ca896d2387c712cb4;hpb=a97500609dc3c1b11f9786d32bc458eb00de4c36 diff --git a/src/stlplus/strings/print_sequence.hpp b/src/stlplus/strings/print_sequence.hpp index 411ddd5..317fbf2 100644 --- a/src/stlplus/strings/print_sequence.hpp +++ b/src/stlplus/strings/print_sequence.hpp @@ -1,46 +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 +#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