20#if (UDON_PLATFORM_OUTPUT_STREAM == UDON_PLATFORM_OUTPUT_CONSOLE) && UDON_PLATFORM_HAS_STL
33 template <
typename OutputStream>
38 template <
typename... Args>
41 return argsUnpack(std::forward<Args>(args)...);
46 template <
typename Head,
typename... Tail>
47 constexpr ResultType argsUnpack(Head&& head, Tail&&... tail)
const noexcept
50 return Test<RemoveCVRefT<Head>>::test(*
this, std::forward<Head>(head)) and argsUnpack(std::forward<Tail>(tail)...);
54 constexpr ResultType argsUnpack() const noexcept {
return true; }
59 template <
typename T,
typename =
void>
62 static constexpr bool test(...)
70 template <
typename Enum>
73 static constexpr bool test(...) {
return true; }
77 template <
typename Array>
100 template <
typename Pr
intable>
106 static constexpr bool test(...) {
return true; }
110 template <
typename Enumerable>
117 template <
typename T>
120 return e.enumerate(tester);
129 template <
typename OutputStream>
133 constexpr Printer(OutputStream& stream,
bool delimiterEnable)
135 , delimiterEnable(delimiterEnable)
141 template <
typename... Args>
144 const_cast<Printer&
>(*this).argsUnpack(std::forward<Args>(args)...);
148 OutputStream& stream;
150 bool delimiterEnable;
153 template <
typename Head,
typename... Tail>
154 ResultType argsUnpack(Head&& head, Tail&&... tail)
156 print(std::forward<Head>(head));
157 if (delimiterEnable and
sizeof...(Tail) > 0)
159 argsUnpack(std::forward<Tail>(tail)...);
164 template <
typename Head>
167 print(std::forward<Head>(head));
175 template <
typename Enum, EnableIfNullptrT<IsEnum<RemoveCVRefT<Enum>>::value> =
nullptr>
178 print(
static_cast<typename std::underlying_type<RemoveCVRefT<Enum>
>::type>(e));
192 for (
auto&& e : array)
209 template <
typename Pr
intable, EnableIfNullptrT<HasMemberFunctionShow<RemoveCVRefT<Pr
intable>>::value> =
nullptr>
220 ResultType print(OutputStreamable&& outputStreamable)
222 stream << std::forward<OutputStreamable>(outputStreamable);
234 enumerable.enumerate(*
this);
253 template <
typename OutputStream,
typename... Args>
255 : std::integral_constant<bool, Impl::IsPrintableImpl<OutputStream>{}(RemoveReferenceT<Args>{}...)>
264 template <
typename T>
265 auto operator<<(T&& rhs)
266 ->
decltype(Serial.print(std::forward<T>(rhs)), std::declval<ArduinoStream&>())
268 Serial.print(std::forward<T>(rhs));
279 template <
typename T>
280 auto operator<<(T&& rhs)
281 ->
decltype(s3d::Print.write(std::forward<T>(rhs)), std::declval<Siv3DStream&>())
283 s3d::Print.write(std::forward<T>(rhs));
287 auto operator<<(
const char* rhs)
289 s3d::Print.write(s3d::Unicode::Widen(rhs));
305 template <
typename... Args>
312 ArduinoStream stream;
315#elif defined(SIV3D_INCLUDED)
321#elif UDON_PLATFORM_OUTPUT_STREAM == UDON_PLATFORM_OUTPUT_CONSOLE
328 printer(std::forward<Args>(args)...);
338 template <
typename... Args>
350 template <
typename... Args>
361 template <
typename... Args>
メンバ変数を列挙しストリームへ出力する
Definition Show.hpp:131
constexpr ResultType operator()(Args &&... args) const
Definition Show.hpp:142
void ResultType
Definition Show.hpp:139
constexpr Printer(OutputStream &stream, bool delimiterEnable)
Definition Show.hpp:133
void ShowImpl(const ShowConfig &config, Args &&... args)
Definition Show.hpp:306
Definition SerializerTraits.hpp:92
std::is_enum< T > IsEnum
Definition Typedef.hpp:49
EnableIfT< Test, std::nullptr_t > EnableIfNullptrT
Definition Typedef.hpp:81
EnableIfT< Test, void > EnableIfVoidT
Definition Typedef.hpp:69
std::is_same< DecayT< T >, const char * > IsCString
Definition Typedef.hpp:58
std::is_array< T > IsArray
Definition Typedef.hpp:52
void Showln(Args &&... args)
改行、区切り文字ありで出力する
Definition Show.hpp:351
void Show(Args &&... args)
区切り文字ありで出力する
Definition Show.hpp:339
void ShowRaw(Args &&... args)
改行、区切り文字なしで出力する
Definition Show.hpp:362
static constexpr bool test(const IsPrintableImpl &self, T &&array)
Definition Show.hpp:85
static constexpr bool test(...)
Definition Show.hpp:73
static constexpr bool test(const IsPrintableImpl &tester, T &&e)
Definition Show.hpp:118
static constexpr bool test(...)
Definition Show.hpp:106
static constexpr bool test(...)
Definition Show.hpp:62
オブジェクトが全て出力可能か判定する
Definition Show.hpp:35
bool ResultType
Definition Show.hpp:36
constexpr ResultType operator()(Args &&... args) const noexcept
Definition Show.hpp:39
bool newline
Definition Show.hpp:302
bool delimiter
Definition Show.hpp:301
T に enumerate(f) が存在するかどうかを判定する
Definition HasMemberFunction.hpp:135
T に T::show 関数が存在するか
Definition HasMemberFunction.hpp:48
Definition HasMemberFunction.hpp:148
オブジェクトが全て出力可能か判定する
Definition Show.hpp:256