Reece
5bc1985eca
[*] Added const modifier to cpuid functions [*] Added OnExit to planned API interface [*] BlobReader now holds onto a handle of a ByteBuffer, allowing for shared usage -> aiding in the mitigation of allocations/second and needless heavy copy of objects
66 lines
1.9 KiB
C++
66 lines
1.9 KiB
C++
/***
|
|
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
|
|
|
|
File: Console.hpp
|
|
Date: 2021-6-9
|
|
Author: Reece
|
|
***/
|
|
#pragma once
|
|
|
|
#include "EAnsiColor.hpp"
|
|
#include "ConsoleMessage.hpp"
|
|
|
|
namespace Aurora::Console
|
|
{
|
|
namespace Logging
|
|
{
|
|
struct ILogger;
|
|
}
|
|
|
|
/// Writes a log message to the console subscribers and telemetry outputs
|
|
AUKN_SYM void WriteLine(AuUInt8 level, const ConsoleMessage &msg);
|
|
|
|
/**
|
|
* @brief Overloads the ILogger backend of the AuLogXX functions
|
|
* @param defaultGlobalLogger
|
|
* @return
|
|
*/
|
|
AUKN_SYM void SetGlobalLogger(const AuSPtr<Logging::ILogger> &defaultGlobalLogger);
|
|
|
|
/**
|
|
* @brief Returns the untouched ILogger interface of the AuLogXX functions as configured by the Aurora::RuntimeStartInfo structure
|
|
* @return
|
|
*/
|
|
AUKN_SYM AuSPtr<Logging::ILogger> GetDefaultLogInterface();
|
|
|
|
/**
|
|
* @brief Async read of the underlying binary stream, unlocalized and potentially being consumed by other users.
|
|
* Consider using `Hooks::SetCallbackAndDisableCmdProcessing` for asynchronous utf-8 processed line based input
|
|
* @param buffer
|
|
* @param length
|
|
* @return
|
|
*/
|
|
AUKN_SYM AuUInt32 ReadStdIn(void *buffer, AuUInt32 length);
|
|
|
|
/**
|
|
* @brief Synchronous binary write to the applications stdout stream. Consider using `AuLogInfo` for general purpose messaging
|
|
* @param buffer
|
|
* @param length
|
|
* @return
|
|
*/
|
|
AUKN_SYM AuUInt32 WriteStdOut(const void *buffer, AuUInt32 length);
|
|
|
|
/**
|
|
* @brief Simulates an input line from an internal logger/console interface given a UTF-8 string
|
|
* @param string
|
|
* @return
|
|
*/
|
|
AUKN_SYM bool DispatchRawLine(const AuString &string);
|
|
|
|
AUKN_SYM void OpenLateStd();
|
|
AUKN_SYM void OpenLateGUI();
|
|
}
|
|
|
|
#include "Commands/Commands.hpp"
|
|
#include "Hooks/Hooks.hpp"
|
|
#include "Logging/Logging.hpp" |