]> git.tdb.fi Git - libs/core.git/blob - source/print.h
Recognize FileNotFound on win32
[libs/core.git] / source / print.h
1 /* $Id$
2
3 This file is part of libmspio
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef MSP_IO_PRINT_H_
9 #define MSP_IO_PRINT_H_
10
11 #include <msp/strings/formatter.h>
12 #include "base.h"
13
14 namespace Msp {
15 namespace IO {
16
17 /**
18 Writes a string to an I/O object.  Same as o.write(f).  Provided for
19 completeness with the other print functions.
20 */
21 inline unsigned print(Base &o, const std::string &f)
22 { return o.write(f); }
23
24 template<typename A1>
25 inline unsigned print(Base &o, const std::string &f, A1 a1)
26 { return o.write(format(f, a1)); }
27
28 template<typename A1, typename A2>
29 inline unsigned print(Base &o, const std::string &f, A1 a1, A2 a2)
30 { return o.write(format(f, a1, a2)); }
31
32 template<typename A1, typename A2, typename A3>
33 inline unsigned print(Base &o, const std::string &f, A1 a1, A2 a2, A3 a3)
34 { return o.write(format(f, a1, a2, a3)); }
35
36 template<typename A1, typename A2, typename A3, typename A4>
37 inline 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)); }
39
40 template<typename A1, typename A2, typename A3, typename A4, typename A5>
41 inline 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)); }
43
44 } // namespace IO
45 } // namespace Msp
46
47 #endif