![]() |
Divide Framework 0.1
A free and open-source 3D Framework under heavy development
|
#include <Console.h>
Classes | |
struct | ConsolePrintCallbackEntry |
struct | OutputEntry |
Public Types | |
enum class | EntryType : U8 { INFO = 0 , WARNING , ERR , COMMAND , COUNT } |
enum class | Flags : U8 { DECORATE_TIMESTAMP = toBit( 1 ) , DECORATE_THREAD_ID = toBit( 2 ) , DECORATE_SEVERITY = toBit( 3 ) , DECORATE_FRAME = toBit( 4 ) , ENABLE_OUTPUT = toBit( 5 ) , ENABLE_ERROR_STREAM = toBit( 6 ) , PRINT_IMMEDIATE = toBit( 7 ) , COUNT = 7 } |
using | ConsolePrintCallback = std::function< void(const OutputEntry &)> |
Public Member Functions | |
template<typename... Args> | |
NO_INLINE void | d_printfn (const char *format, Args &&... args) |
template<typename... Args> | |
NO_INLINE void | d_printf (const char *format, Args &&... args) |
template<typename... Args> | |
NO_INLINE void | d_warnfn (const char *format, Args &&... args) |
template<typename... Args> | |
NO_INLINE void | d_warnf (const char *format, Args &&... args) |
template<typename... Args> | |
NO_INLINE void | d_errorfn (const char *format, Args &&... args) |
template<typename... Args> | |
NO_INLINE void | d_errorf (const char *format, Args &&... args) |
template<typename... Args> | |
NO_INLINE void | printfn (const char *format, Args &&... args) |
template<typename... Args> | |
NO_INLINE void | printf (const char *format, Args &&... args) |
template<typename... Args> | |
NO_INLINE void | warnfn (const char *format, Args &&... args) |
template<typename... Args> | |
NO_INLINE void | warnf (const char *format, Args &&... args) |
template<typename... Args> | |
NO_INLINE void | errorfn (const char *format, Args &&... args) |
template<typename... Args> | |
NO_INLINE void | errorf (const char *format, Args &&... args) |
template<typename... Args> | |
NO_INLINE void | printfn (std::ofstream &outStream, const char *format, Args &&... args) |
template<typename... Args> | |
NO_INLINE void | printf (std::ofstream &outStream, const char *format, Args &&... args) |
template<typename... Args> | |
NO_INLINE void | warnfn (std::ofstream &outStream, const char *format, Args &&... args) |
template<typename... Args> | |
NO_INLINE void | warnf (std::ofstream &outStream, const char *format, Args &&... args) |
template<typename... Args> | |
NO_INLINE void | errorfn (std::ofstream &outStream, const char *format, Args &&... args) |
template<typename... Args> | |
NO_INLINE void | errorf (std::ofstream &outStream, const char *format, Args &&... args) |
template<typename... Args> | |
NO_INLINE void | d_printfn (std::ofstream &outStream, const char *format, Args &&... args) |
template<typename... Args> | |
NO_INLINE void | d_printf (std::ofstream &outStream, const char *format, Args &&... args) |
template<typename... Args> | |
NO_INLINE void | d_warnfn (std::ofstream &outStream, const char *format, Args &&... args) |
template<typename... Args> | |
NO_INLINE void | d_warnf (std::ofstream &outStream, const char *format, Args &&... args) |
template<typename... Args> | |
NO_INLINE void | d_errorfn (std::ofstream &outStream, const char *format, Args &&... args) |
template<typename... Args> | |
NO_INLINE void | d_errorf (std::ofstream &outStream, const char *format, Args &&... args) |
![]() | |
NonCopyable (const NonCopyable &)=delete | |
NonCopyable & | operator= (const NonCopyable &)=delete |
NonCopyable (NonCopyable &&)=default | |
NonCopyable & | operator= (NonCopyable &&)=default |
Static Public Member Functions | |
template<typename... T> | |
static NO_INLINE void | printfn (const char *format, T &&... args) |
template<typename... T> | |
static NO_INLINE void | printf (const char *format, T &&... args) |
template<typename... T> | |
static NO_INLINE void | warnfn (const char *format, T &&... args) |
template<typename... T> | |
static NO_INLINE void | warnf (const char *format, T &&... args) |
template<typename... T> | |
static NO_INLINE void | errorfn (const char *format, T &&... args) |
template<typename... T> | |
static NO_INLINE void | errorf (const char *format, T &&... args) |
template<typename... T> | |
static NO_INLINE void | d_printfn (const char *format, T &&... args) |
template<typename... T> | |
static NO_INLINE void | d_printf (const char *format, T &&... args) |
template<typename... T> | |
static NO_INLINE void | d_warnfn (const char *format, T &&... args) |
template<typename... T> | |
static NO_INLINE void | d_warnf (const char *format, T &&... args) |
template<typename... T> | |
static NO_INLINE void | d_errorfn (const char *format, T &&... args) |
template<typename... T> | |
static NO_INLINE void | d_errorf (const char *format, T &&... args) |
template<typename... T> | |
static NO_INLINE void | printfn (std::ofstream &outStream, const char *format, T &&... args) |
template<typename... T> | |
static NO_INLINE void | printf (std::ofstream &outStream, const char *format, T &&... args) |
template<typename... T> | |
static NO_INLINE void | warnfn (std::ofstream &outStream, const char *format, T &&... args) |
template<typename... T> | |
static NO_INLINE void | warnf (std::ofstream &outStream, const char *format, T &&... args) |
template<typename... T> | |
static NO_INLINE void | errorfn (std::ofstream &outStream, const char *format, T &&... args) |
template<typename... T> | |
static NO_INLINE void | errorf (std::ofstream &outStream, const char *format, T &&... args) |
template<typename... T> | |
static NO_INLINE void | d_printfn (std::ofstream &outStream, const char *format, T &&... args) |
template<typename... T> | |
static NO_INLINE void | d_printf (std::ofstream &outStream, const char *format, T &&... args) |
template<typename... T> | |
static NO_INLINE void | d_warnfn (std::ofstream &outStream, const char *format, T &&... args) |
template<typename... T> | |
static NO_INLINE void | d_warnf (std::ofstream &outStream, const char *format, T &&... args) |
template<typename... T> | |
static NO_INLINE void | d_errorfn (std::ofstream &outStream, const char *format, T &&... args) |
template<typename... T> | |
static NO_INLINE void | d_errorf (std::ofstream &outStream, const char *format, T &&... args) |
static void | Flush () |
static void | Start (std::string_view logFilePath, std::string_view erroFilePath, bool printCopyright) noexcept |
static void | Stop () |
static void | ToggleFlag (const Flags flag, const bool state) |
static bool | IsFlagSet (const Flags flag) |
static size_t | BindConsoleOutput (const ConsolePrintCallback &guiConsoleCallback) |
static bool | UnbindConsoleOutput (size_t &index) |
Static Protected Member Functions | |
static void | Output (std::string_view text, bool newline, EntryType type) |
static void | Output (std::ostream &outStream, std::string_view text, bool newline, EntryType type) |
static void | DecorateAndPrint (std::ostream &outStream, std::string_view text, bool newline, EntryType type) |
static void | PrintToFile (const OutputEntry &entry) |
Static Private Attributes | |
static std::ofstream | s_logStream |
static std::ofstream | s_errorStream |
static SharedMutex | s_callbackLock |
static vector< ConsolePrintCallbackEntry > | s_guiConsoleCallbacks |
static U32 | s_flags = DEFAULT_FLAGS |
static std::atomic_bool | s_running = false |
Additional Inherited Members | |
![]() | |
NonCopyable ()=default | |
~NonCopyable ()=default | |
using Divide::Console::ConsolePrintCallback = std::function<void( const OutputEntry& )> |
|
strong |
|
strong |
|
static |
Definition at line 194 of file Console.cpp.
NO_INLINE void Divide::Console::d_errorf | ( | const char * | format, |
Args &&... | args | ||
) |
Definition at line 110 of file Console.inl.
|
static |
NO_INLINE void Divide::Console::d_errorf | ( | std::ofstream & | outStream, |
const char * | format, | ||
Args &&... | args | ||
) |
Definition at line 260 of file Console.inl.
|
static |
NO_INLINE void Divide::Console::d_errorfn | ( | const char * | format, |
Args &&... | args | ||
) |
Definition at line 97 of file Console.inl.
|
static |
NO_INLINE void Divide::Console::d_errorfn | ( | std::ofstream & | outStream, |
const char * | format, | ||
Args &&... | args | ||
) |
Definition at line 247 of file Console.inl.
|
static |
NO_INLINE void Divide::Console::d_printf | ( | const char * | format, |
Args &&... | args | ||
) |
Definition at line 58 of file Console.inl.
|
static |
NO_INLINE void Divide::Console::d_printf | ( | std::ofstream & | outStream, |
const char * | format, | ||
Args &&... | args | ||
) |
Definition at line 208 of file Console.inl.
|
static |
NO_INLINE void Divide::Console::d_printfn | ( | const char * | format, |
Args &&... | args | ||
) |
Definition at line 45 of file Console.inl.
|
static |
NO_INLINE void Divide::Console::d_printfn | ( | std::ofstream & | outStream, |
const char * | format, | ||
Args &&... | args | ||
) |
Definition at line 195 of file Console.inl.
|
static |
NO_INLINE void Divide::Console::d_warnf | ( | const char * | format, |
Args &&... | args | ||
) |
Definition at line 84 of file Console.inl.
|
static |
NO_INLINE void Divide::Console::d_warnf | ( | std::ofstream & | outStream, |
const char * | format, | ||
Args &&... | args | ||
) |
Definition at line 234 of file Console.inl.
|
static |
NO_INLINE void Divide::Console::d_warnfn | ( | const char * | format, |
Args &&... | args | ||
) |
Definition at line 71 of file Console.inl.
|
static |
NO_INLINE void Divide::Console::d_warnfn | ( | std::ofstream & | outStream, |
const char * | format, | ||
Args &&... | args | ||
) |
Definition at line 221 of file Console.inl.
|
static |
|
staticprotected |
Definition at line 41 of file Console.cpp.
NO_INLINE void Divide::Console::errorf | ( | const char * | format, |
Args &&... | args | ||
) |
Definition at line 153 of file Console.inl.
|
static |
NO_INLINE void Divide::Console::errorf | ( | std::ofstream & | outStream, |
const char * | format, | ||
Args &&... | args | ||
) |
Definition at line 189 of file Console.inl.
|
static |
NO_INLINE void Divide::Console::errorfn | ( | const char * | format, |
Args &&... | args | ||
) |
Definition at line 147 of file Console.inl.
|
static |
NO_INLINE void Divide::Console::errorfn | ( | std::ofstream & | outStream, |
const char * | format, | ||
Args &&... | args | ||
) |
Definition at line 183 of file Console.inl.
|
static |
|
static |
Definition at line 126 of file Console.cpp.
|
inlinestatic |
|
staticprotected |
Definition at line 73 of file Console.cpp.
|
staticprotected |
Definition at line 81 of file Console.cpp.
NO_INLINE void Divide::Console::printf | ( | const char * | format, |
Args &&... | args | ||
) |
Definition at line 129 of file Console.inl.
|
static |
NO_INLINE void Divide::Console::printf | ( | std::ofstream & | outStream, |
const char * | format, | ||
Args &&... | args | ||
) |
Definition at line 165 of file Console.inl.
|
static |
NO_INLINE void Divide::Console::printfn | ( | const char * | format, |
Args &&... | args | ||
) |
Definition at line 123 of file Console.inl.
|
static |
NO_INLINE void Divide::Console::printfn | ( | std::ofstream & | outStream, |
const char * | format, | ||
Args &&... | args | ||
) |
Definition at line 159 of file Console.inl.
|
static |
|
staticprotected |
Definition at line 106 of file Console.cpp.
|
staticnoexcept |
Do not remove the following license without express permission granted by Divide-Studio or Ionut Cava
Definition at line 144 of file Console.cpp.
|
static |
Definition at line 179 of file Console.cpp.
|
inlinestatic |
|
static |
Definition at line 206 of file Console.cpp.
NO_INLINE void Divide::Console::warnf | ( | const char * | format, |
Args &&... | args | ||
) |
Definition at line 141 of file Console.inl.
|
static |
NO_INLINE void Divide::Console::warnf | ( | std::ofstream & | outStream, |
const char * | format, | ||
Args &&... | args | ||
) |
Definition at line 177 of file Console.inl.
|
static |
NO_INLINE void Divide::Console::warnfn | ( | const char * | format, |
Args &&... | args | ||
) |
Definition at line 135 of file Console.inl.
|
static |
NO_INLINE void Divide::Console::warnfn | ( | std::ofstream & | outStream, |
const char * | format, | ||
Args &&... | args | ||
) |
Definition at line 171 of file Console.inl.
|
static |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |
|
staticprivate |