xtd 0.2.0
print.hpp
Go to the documentation of this file.
1
4#pragma once
5
6#define __XTD_CORE_INTERNAL__
8#undef __XTD_CORE_INTERNAL__
9#include "string.hpp"
10
12namespace xtd {
18 template<class arg_t>
19 void print(FILE* file, arg_t&& value) {
20 __xtd_print_with_file_write__(false, file, string::format("{}", value));
21 }
22
24 template<class type_t>
25 void print(FILE* file, std::initializer_list<type_t>&& il) {
26 __xtd_print_with_file_write__(false, file, string::format("{}", il));
27 }
29
36 template<class ...args_t>
37 void print(FILE* file, const xtd::string& fmt, args_t&& ... values) {
38 __xtd_print_with_file_write__(false, file, string::format(fmt, std::forward<args_t>(values)...));
39 }
40
46 template<class ...args_t>
47 void print(FILE* file, const char* fmt, args_t&& ... values) {
48 __xtd_print_with_file_write__(false, file, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
49 }
50
56 template<class ...args_t>
57 void print(FILE* file, const char8_t* fmt, args_t&& ... values) {
58 __xtd_print_with_file_write__(false, file, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
59 }
60
66 template<class ...args_t>
67 void print(FILE* file, const char16_t* fmt, args_t&& ... values) {
68 __xtd_print_with_file_write__(false, file, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
69 }
70
76 template<class ...args_t>
77 void print(FILE* file, const char32_t* fmt, args_t&& ... values) {
78 __xtd_print_with_file_write__(false, file, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
79 }
80
86 template<class ...args_t>
87 void print(FILE* file, const wchar_t* fmt, args_t&& ... values) {
88 __xtd_print_with_file_write__(false, file, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
89 }
90
95 template<class arg_t>
96 void print(std::ostream& os, arg_t&& value) {
97 __xtd_print_with_ostream_write__(false, os, string::format("{}", value));
98 }
99
101 template<class type_t>
102 void print(std::ostream& os, std::initializer_list<type_t>&& il) {
103 __xtd_print_with_ostream_write__(false, os, string::format("{}", il));
104 }
106
112 template<class ...args_t>
113 void print(std::ostream& os, const xtd::string& fmt, args_t&& ... values) {
114 __xtd_print_with_ostream_write__(false, os, string::format(fmt, std::forward<args_t>(values)...));
115 }
116
121 template<class ...args_t>
122 void print(std::ostream& os, const char* fmt, args_t&& ... values) {
123 __xtd_print_with_ostream_write__(false, os, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
124 }
125
130 template<class ...args_t>
131 void print(std::ostream& os, const char8_t* fmt, args_t&& ... values) {
132 __xtd_print_with_ostream_write__(false, os, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
133 }
134
139 template<class ...args_t>
140 void print(std::ostream& os, const char16_t* fmt, args_t&& ... values) {
141 __xtd_print_with_ostream_write__(false, os, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
142 }
143
148 template<class ...args_t>
149 void print(std::ostream& os, const char32_t* fmt, args_t&& ... values) {
150 __xtd_print_with_ostream_write__(false, os, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
151 }
152
157 template<class ...args_t>
158 void print(std::ostream& os, const wchar_t* fmt, args_t&& ... values) {
159 __xtd_print_with_ostream_write__(false, os, string::format(xtd::string {fmt}, std::forward<args_t>(values)...));
160 }
161
165 template<class arg_t>
166 void print(arg_t&& value) {print(stdout, value);}
167
169 template<class type_t>
170 void print(std::initializer_list<type_t>&& il) {print(stdout, il);}
172
177 template<class ...args_t>
178 void print(const xtd::string& fmt, args_t&& ... values) {print(stdout, fmt, std::forward<args_t>(values)...);}
183 template<class ...args_t>
184 void print(const char* fmt, args_t&& ... values) {print(stdout, fmt, std::forward<args_t>(values)...);}
189 template<class ...args_t>
190 void print(const char8_t* fmt, args_t&& ... values) {print(stdout, fmt, std::forward<args_t>(values)...);}
195 template<class ...args_t>
196 void print(const char16_t* fmt, args_t&& ... values) {print(stdout, fmt, std::forward<args_t>(values)...);}
201 template<class ...args_t>
202 void print(const char32_t* fmt, args_t&& ... values) {print(stdout, fmt, std::forward<args_t>(values)...);}
207 template<class ...args_t>
208 void print(const wchar_t* fmt, args_t&& ... values) {print(stdout, fmt, std::forward<args_t>(values)...);}
209
210}
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
@ print
The PRINT key.
Definition console_key.hpp:56
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::string alias.