From 484b9f949bbb34db16541af6e7a5a5d3f3a126fe Mon Sep 17 00:00:00 2001 From: "Tristan B. Velloza Kildaire" Date: Thu, 2 Mar 2023 11:26:41 +0200 Subject: [PATCH] Context - Added documentation headers for `CompilationInfo` --- source/dlog/context.d | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/source/dlog/context.d b/source/dlog/context.d index cf7fa8e..fe75384 100644 --- a/source/dlog/context.d +++ b/source/dlog/context.d @@ -57,6 +57,18 @@ public struct CompilationInfo public string functionName; public string prettyFunctionName; + /** + * Constructs the compilation information with the provided + * parameters + * + * Params: + * __FILE_FULL_PATH__ = compile time usage file + * __FILE__ = compile time usage file (relative) + * __LINE__ = compile time usage line number + * __MODULE__ = compile time usage module + * __FUNCTION__ = compile time usage function + * __PRETTY_FUNCTION__ = compile time usage function (pretty) + */ this(string fullFilePath, string file, ulong line, string moduleName, string functionName, string prettyFunctionName) { this.fullFilePath = fullFilePath; @@ -67,10 +79,13 @@ public struct CompilationInfo this.prettyFunctionName = prettyFunctionName; } + /** + * Flattens the known compile-time information into a string array + * + * Returns: a string[] + */ public string[] toArray() { return [fullFilePath, file, to!(string)(line), moduleName, functionName, prettyFunctionName]; } - -} - +} \ No newline at end of file