3 This file is part of libmspio
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_IO_PRINT_H_
9 #define MSP_IO_PRINT_H_
11 #include <msp/strings/formatter.h>
18 Writes a string to an I/O object. Same as o.write(f). Provided for
19 completeness with the other print functions.
21 unsigned print(Base &o, const std::string &f)
22 { return o.write(f); }
25 unsigned print(Base &o, const std::string &f, A1 a1)
26 { return o.write(format(f, a1)); }
28 template<typename A1, typename A2>
29 unsigned print(Base &o, const std::string &f, A1 a1, A2 a2)
30 { return o.write(format(f, a1, a2)); }
32 template<typename A1, typename A2, typename A3>
33 unsigned print(Base &o, const std::string &f, A1 a1, A2 a2, A3 a3)
34 { return o.write(format(f, a1, a2, a3)); }
36 template<typename A1, typename A2, typename A3, typename A4>
37 unsigned print(Base &o, const std::string &f, A1 a1, A2 a2, A3 a3, A4 a4)
38 { return o.write(format(f, a1, a2, a3, a4)); }
40 template<typename A1, typename A2, typename A3, typename A4, typename A5>
41 unsigned print(Base &o, const std::string &f, A1 a1, A2 a2, A3 a3, A4 a4, A5 a5)
42 { return o.write(format(f, a1, a2, a3, a4, a5)); }