xtd 0.2.0
println.hpp
Go to the documentation of this file.
1
4#pragma once
5#define __XTD_CORE_INTERNAL__
7#undef __XTD_CORE_INTERNAL__
8#include "string.hpp"
9
11namespace xtd {
14 inline void println(FILE* file) {
15 __xtd_print_with_file_write__(true, file, "");
16 }
17
22 template<class arg_t>
23 void println(FILE* file, arg_t&& value) {
24 __xtd_print_with_file_write__(true, file, string::format("{}", value));
25 }
26
28 template<class type_t>
29 void println(FILE* file, const std::initializer_list<type_t>& il) {
30 __xtd_print_with_file_write__(true, file, string::format("{}", il));
31 }
33
39 template<class ...args_t>
40 void println(FILE* file, const xtd::string& fmt, args_t&& ... values) {
41 __xtd_print_with_file_write__(true, file, string::format(fmt, std::forward<args_t>(values)...));
42 }
43
48 template<class ...args_t>
49 void println(FILE* file, const char* fmt, args_t&& ... values) {
50 __xtd_print_with_file_write__(true, file, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
51 }
52
57 template<class ...args_t>
58 void println(FILE* file, const char8_t* fmt, args_t&& ... values) {
59 __xtd_print_with_file_write__(true, file, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
60 }
61
66 template<class ...args_t>
67 void println(FILE* file, const char16_t* fmt, args_t&& ... values) {
68 __xtd_print_with_file_write__(true, file, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
69 }
70
75 template<class ...args_t>
76 void println(FILE* file, const char32_t* fmt, args_t&& ... values) {
77 __xtd_print_with_file_write__(true, file, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
78 }
79
84 template<class ...args_t>
85 void println(FILE* file, const wchar_t* fmt, args_t&& ... values) {
86 __xtd_print_with_file_write__(true, file, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
87 }
88
91 inline void println(std::ostream& os) {
92 __xtd_print_with_ostream_write__(true, os, "");
93 }
94
99 template<class arg_t>
100 void println(std::ostream& os, arg_t&& value) {
101 __xtd_print_with_ostream_write__(true, os, string::format("{}", value));
102 }
103
105 template<class type_t>
106 void println(std::ostream& os, const std::initializer_list<type_t>& il) {
107 __xtd_print_with_ostream_write__(true, os, string::format("{}", il));
108 }
110
116 template<class ...args_t>
117 void println(std::ostream& os, const xtd::string& fmt, args_t&& ... values) {
118 __xtd_print_with_ostream_write__(true, os, string::format(fmt, std::forward<args_t>(values)...));
119 }
120
125 template<class ...args_t>
126 void println(std::ostream& os, const char* fmt, args_t&& ... values) {
127 __xtd_print_with_ostream_write__(true, os, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
128 }
129
134 template<class ...args_t>
135 void println(std::ostream& os, const char8_t* fmt, args_t&& ... values) {
136 __xtd_print_with_ostream_write__(true, os, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
137 }
138
143 template<class ...args_t>
144 void println(std::ostream& os, const char16_t* fmt, args_t&& ... values) {
145 __xtd_print_with_ostream_write__(true, os, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
146 }
147
152 template<class ...args_t>
153 void println(std::ostream& os, const char32_t* fmt, args_t&& ... values) {
154 __xtd_print_with_ostream_write__(true, os, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
155 }
156
161 template<class ...args_t>
162 void println(std::ostream& os, const wchar_t* fmt, args_t&& ... values) {
163 __xtd_print_with_ostream_write__(true, os, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
164 }
165
167 inline void println() {xtd::println(stdout);}
168
172 template<class arg_t>
173 void println(arg_t&& value) {xtd::println(stdout, value);}
174
176 template<class type_t>
177 void println(const std::initializer_list<type_t>& il) {xtd::println(stdout, il);}
179
184 template<class ...args_t>
185 void println(const xtd::string& fmt, args_t&& ... values) {xtd::println(stdout, fmt, std::forward<args_t>(values)...);}
190 template<class ...args_t>
191 void println(const char* fmt, args_t&& ... values) {xtd::println(stdout, fmt, std::forward<args_t>(values)...);}
196 template<class ...args_t>
197 void println(const char8_t* fmt, args_t&& ... values) {xtd::println(stdout, fmt, std::forward<args_t>(values)...);}
202 template<class ...args_t>
203 void println(const char16_t* fmt, args_t&& ... values) {xtd::println(stdout, fmt, std::forward<args_t>(values)...);}
208 template<class ...args_t>
209 void println(const char32_t* fmt, args_t&& ... values) {xtd::println(stdout, fmt, std::forward<args_t>(values)...);}
214 template<class ...args_t>
215 void println(const wchar_t* fmt, args_t&& ... values) {xtd::println(stdout, fmt, std::forward<args_t>(values)...);}
216}
Contains xtd_print_with_file_write and xtd_print_with_ostream_write methods.
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition __string_definitions.hpp:43
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
void println()
Writes the current line terminator to the standard output stream using the specified format informati...
Definition println.hpp:167
Contains xtd::string alias.