FLiveCoding
- Module
- MowoEngine
- Header
#include "Core/LiveCoding.h"- Namespace
Mowo
Public functions
| Returns | Name | Description |
|---|---|---|
bool | IsAvailable | False, with the reason, where Live Coding cannot run: not Windows, a packaged build with no tree beside it, mbt never published. |
bool | Start | Starts compiling every .cpp changed since the running binaries were linked. |
bool | IsCompiling | |
void | Tick | Applies a finished compile. |
void | RegisterConsoleCommand | LiveCoding at the console; Engine::Initialize registers it. |
void | Shutdown | Waits for a compile still running, so its thread is not torn down under it at exit. |
int32_t | RunCompile | Synchronous halves, for tests and tools: run mbt livecoding with the extra arguments and write its report to reportPath; then apply that report. |
FResult | ApplyReport | |
FResult | LastResult | |
uint32_t | SuccessfulPatches | |
uint32_t | CompletedCompiles | Compiles that finished and were applied (or refused) this session, so a UI can tell a new outcome from the one it already showed. |
FProgress | CompileProgress | |
std::string | SourceTreeRoot | The tree the running binaries were built from, found by walking up from the executable; empty in a packaged build. |
Function details
IsAvailable
static bool IsAvailable(std::string* outWhy = nullptr)False, with the reason, where Live Coding cannot run: not Windows, a packaged build with no tree beside it, mbt never published.
Start
static bool Start()Starts compiling every .cpp changed since the running binaries were linked. False when a compile is already running or Live Coding is unavailable (the reason is logged).
IsCompiling
static bool IsCompiling()Tick
static void Tick()Applies a finished compile. Called once a frame by the engine loop.
RegisterConsoleCommand
static void RegisterConsoleCommand()LiveCoding at the console; Engine::Initialize registers it.
Shutdown
static void Shutdown()Waits for a compile still running, so its thread is not torn down under it at exit.
RunCompile
static int32_t RunCompile(const std::vector<std::string>& extraArgs, const std::string& reportPath, std::string& outOutput)Synchronous halves, for tests and tools: run mbt livecoding with the extra arguments and write its report to reportPath; then apply that report. RunCompile returns mbt's exit code (-1 when it could not run).
ApplyReport
static FResult ApplyReport(const std::string& reportPath)LastResult
static FResult LastResult()SuccessfulPatches
static uint32_t SuccessfulPatches()CompletedCompiles
static uint32_t CompletedCompiles()Compiles that finished and were applied (or refused) this session, so a UI can tell a new outcome from the one it already showed.
CompileProgress
static FProgress CompileProgress()SourceTreeRoot
static std::string SourceTreeRoot()The tree the running binaries were built from, found by walking up from the executable; empty in a packaged build.