AuroraRuntime/Include/Aurora/Runtime.hpp
2023-12-01 02:41:58 +00:00

119 lines
3.9 KiB
C++

/***
Copyright (C) 2021 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: Runtime.hpp
Date: 2021-6-9
Author: Reece
***/
#pragma once
#if defined(AURORA_ENGINE_KERNEL_STATIC)
#define AUKN_SYM
#else
#if defined(AURORA_ENGINE_KERNEL_EXPORT)
#define AUKN_SYM AURORA_SYMBOL_EXPORT
#else
#define AUKN_SYM AURORA_SYMBOL_IMPORT
#endif
#endif
#include <auROXTL.hpp>
#if defined(_AUHAS_FMT)
#include <fmt/core.h>
#include <fmt/format.h>
#include <fmt/chrono.h>
#include <fmt/ranges.h>
#endif
#if !defined(_AUHAS_UUID)
#error Missing stduuid library
#endif
#include <uuid.h>
#define AUKN_SHARED_API(name, type, ...) AU_SHARED_API_EX(AUKN_SYM, name, type, ## __VA_ARGS__)
#define AUKN_SHARED_SOO(name, type, size, ...) AUKN_SHARED_API(name, type, ## __VA_ARGS__) AUROXTL_INTERFACE_SOO_HDR_EX(AUKN_SYM, name, type, size)
#define AUKN_SHARED_SOO_NC(name, type, size, ...) AUKN_SHARED_API(name, type, ## __VA_ARGS__) AUROXTL_INTERFACE_SOO_HDR_EX_NC(AUKN_SYM, name, type, size)
#define AUKN_SHARED_SOO_NCM(name, type, size, ...) AUKN_SHARED_API(name, type, ## __VA_ARGS__) AUROXTL_INTERFACE_SOO_HDR_EX_NCM(AUKN_SYM, name, type, size)
#define AUKN_SHARED_SOO2(name, type, size, ctrs, ...) AUKN_SHARED_API(name, type, ## __VA_ARGS__) AUROXTL_INTERFACE_SOO_HDR_EX(AUKN_SYM, name, type, size, AU_STRIP_BRACKETS(ctrs))
#define AUKN_SHARED_SOO2_NC(name, type, size, ctrs, ...) AUKN_SHARED_API(name, type, ## __VA_ARGS__) AUROXTL_INTERFACE_SOO_HDR_EX_NC(AUKN_SYM, name, type, size, AU_STRIP_BRACKETS(ctrs))
#define AUKN_SHARED_SOO2_NCM(name, type, size, ctrs, ...) AUKN_SHARED_API(name, type, ## __VA_ARGS__) AUROXTL_INTERFACE_SOO_HDR_EX_NCM(AUKN_SYM, name, type, size, AU_STRIP_BRACKETS(ctrs))
#if defined(_AURORA_RUNTIME_BUILD_API_INTERFACES)
#define AUKN_INTERFACE AUI_INTERFACE_IMPL
#define AUKN_INTERFACE_EXT AUI_INTERFACE_EXT_IMPL
#else
#define AUKN_INTERFACE AUI_INTERFACE_FWD
#define AUKN_INTERFACE_EXT AUI_INTERFACE_EXT_FWD
#endif
#include "Memory/Memory.hpp"
#include "Utility/PrivData.hpp"
#include "Console/Console.hpp"
#include "Logging/Logging.hpp"
#include "Crypto/Crypto.hpp"
#include "Compression/Compression.hpp"
#include "Data/Data.hpp"
#include "Debug/Debug.hpp"
#include "Hashing/Hashing.hpp"
#include "HWInfo/HWInfo.hpp"
#include "IO/IO.hpp"
#include "Time/Time.hpp"
#include "Locale/Locale.hpp"
#include "Parse/Parse.hpp"
#include "Process/Process.hpp"
#include "Registry/Registry.hpp"
#include "RNG/RNG.hpp"
#include "Telemetry/Telemetery.hpp"
#include "Threading/Threading.hpp"
#include "Async/Async.hpp"
#include "Processes/Processes.hpp"
#include "IO/Loop/Loop.hpp"
#include "IO/IPC/IPC.hpp"
#include "SWInfo/SWInfo.hpp"
#include "Exit/Exit.hpp"
#include "CmdLine/CmdLine.hpp"
#include "Utility/RateLimiter.hpp"
#include "Memory/_ByteBuffer.hpp"
#include "RuntimeAliases.hpp"
#include "Aurora/Async/AuFutures.hpp"
#include "RuntimeConfig.hpp"
namespace Aurora
{
/**
* @brief Initializes Aurora Runtime for the first and only time
* @return
*/
AUKN_SYM void RuntimeStart(const RuntimeStartInfo &info);
/**
* @brief Querys the state of the DLL or Static Library
* @return true after at least one RuntimeStart
*/
AUKN_SYM bool RuntimeHasStarted();
/**
* @brief You have **one** opportunity to swap the system locality before it locked
* This can be used by platform gems to align the runtime language and decimal dot notation to a given locality
* @return
*/
AUKN_SYM void RuntimeOverloadLocality(const AuPair<AuString, AuString> &locality);
/**
* @brief Cleans up Aurora Runtime regardless of the count of calls to RuntimeShutdown or RuntimeStart
* @return
*/
AUKN_SYM void RuntimeShutdown();
/**
* @brief Single threaded main pump for GUI applications polling for non-async subsystem callbacks
* @return
*/
AUKN_SYM void RuntimeSysPump();
}