55 lines
1.3 KiB
C++
55 lines
1.3 KiB
C++
/***
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: ConsoleMessage.hpp
|
|
Date: 2021-6-10
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
//#include <Aurora/Time/Time.hpp>
|
|
|
|
namespace Aurora::Threading::Threads
|
|
{
|
|
AUKN_SYM AuThreadId_t GetThreadId();
|
|
}
|
|
|
|
namespace Aurora::Time
|
|
{
|
|
AUKN_SYM AuUInt64 CurrentClockMS();
|
|
}
|
|
|
|
namespace Aurora::Console
|
|
{
|
|
class AUKN_SYM ConsoleMessage
|
|
{
|
|
public:
|
|
EAnsiColor color;
|
|
AuString prefix;
|
|
AuString line;
|
|
AuUInt64 time;
|
|
AuThreadId_t tid;
|
|
|
|
ConsoleMessage()
|
|
{
|
|
color = EAnsiColor::eReset;
|
|
}
|
|
|
|
ConsoleMessage(const AuString &prefix, const AuString &line) : prefix(prefix), line(line), color(EAnsiColor::eReset)
|
|
{
|
|
time = Time::CurrentClockMS();
|
|
tid = Threading::Threads::GetThreadId();
|
|
}
|
|
|
|
ConsoleMessage(const EAnsiColor color, const AuString &prefix, const AuString &line) : prefix(prefix), line(line), color(color)
|
|
{
|
|
time = Time::CurrentClockMS();
|
|
tid = Threading::Threads::GetThreadId();
|
|
}
|
|
|
|
AuString StringifyTime(bool simple = false) const;
|
|
AuString GetWrappedTag() const;
|
|
AuString ToConsole() const;
|
|
AuString ToSimplified() const;
|
|
};
|
|
} |