4#include "../Containers/Vector.h"
5#include "../Strings/StringFormat.h"
6#include "../Strings/StringView.h"
37 template <
typename... Types>
67#if SC_PLATFORM_WINDOWS
69 bool isConsole =
true;
70 bool isDebugger =
true;
78#if !defined(SC_LOG_MESSAGE)
79#define SC_LOG_MESSAGE(fmt, ...) \
81 globalConsole->print(fmt, ##__VA_ARGS__)
#define SC_COMPILER_EXPORT
Macro for symbol visibility in non-MSVC compilers.
Definition: Compiler.h:78
@ Ascii
Encoding is ASCII.
Writes to console using SC::StringFormat.
Definition: Console.h:27
bool print(StringView fmt, Types &&... args)
Prints a formatted string using SC::StringFormat.
Definition: Console.h:38
Console(Vector< char > &encodingConversionBuffer)
Constructs a console with a conversion buffer used for string conversions (UTF8 / UTF16)
static bool isAttachedToConsole()
Returns true if current process has an active console (Windows only, returns true elsewhere)
void printLine(const StringView str)
Prints a StringView to console and adds a newline at the end of it.
static bool tryAttachingToParentConsole()
Tries attaching current process to parent console (Windows only, has no effect elsewhere)
void print(const StringView str)
Prints a StringView to console.
Non-owning view over a range of characters with UTF Encoding.
Definition: StringView.h:47
constexpr StringEncoding getEncoding() const
Get encoding of this StringView.
Definition: StringView.h:93
A contiguous sequence of heap allocated elements.
Definition: Vector.h:51