From 14b732bf615bb870a3c724bac436c88b069821ac Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Tue, 9 Apr 2024 17:45:22 +0200 Subject: [PATCH] Gogga - Completely finished --- source/gogga/core.d | 44 +++++++++++++++++++++++++++++++++++------- source/gogga/package.d | 17 +++++++--------- 2 files changed, 44 insertions(+), 17 deletions(-) diff --git a/source/gogga/core.d b/source/gogga/core.d index 3c0841b..551329b 100644 --- a/source/gogga/core.d +++ b/source/gogga/core.d @@ -1,10 +1,13 @@ +/** + * Core routines and types + * + * Authors: Tristan Brice Velloza Kildaire (deavmi) + */ module gogga.core; import dlog.core; import dlog.basic; - import std.conv : to; - import dlog.utilities : flatten; import std.array : join; @@ -102,26 +105,44 @@ private struct GoggaCompInfo } } +/** + * A `GoggaMessage` which comprises + * of a `GoggaCompInfo` for context + */ private class GoggaMessage : BasicMessage { + /** + * The line information + */ private GoggaCompInfo ctx; - this() - { - - } - + /** + * Sets the context + * + * Params: + * ctx = the context + */ public void setContext(GoggaCompInfo ctx) { this.ctx = ctx; } + /** + * Returns the context + * + * Returns: the context + */ public GoggaCompInfo getContext() { return this.ctx; } } +/** + * The Gogga transformer which + * applies stylization to + * incoming `GoggaMessage`(s) + */ private class GoggaTransform : Transform { /** @@ -223,8 +244,14 @@ private class GoggaTransform : Transform } } +/** + * A `GoggaLogger` + */ public final class GoggaLogger : BasicLogger { + /** + * The Gogga text transformer + */ private GoggaTransform gogTrans; /** @@ -232,6 +259,9 @@ public final class GoggaLogger : BasicLogger */ private bool debugEnabled = false; + /** + * Constructs a new `GoggaLogger` + */ this() { super(); diff --git a/source/gogga/package.d b/source/gogga/package.d index 80ad557..d1a9d66 100644 --- a/source/gogga/package.d +++ b/source/gogga/package.d @@ -1,17 +1,14 @@ /** * Gogga logging facilities */ +/** + * The Gogga logging library + * + * Authors: Tristan Brice Velloza Kildaire (deavmi) + */ module gogga; -/** - * The logging class which provides the logging print - * calls, controlling of style and whether to debug or - * not +/** + * Core routines and types */ -// public import gogga.core : GoggaLogger; - -// /** -// * The gogga styles supported -// */ -// public import gogga.transform public import gogga.core; \ No newline at end of file