From 85aae0730048a0ad1115e639e3fc6c17b823851c Mon Sep 17 00:00:00 2001 From: Nina Dzugasova <dzugasova.nina@gmail.com> Date: Wed, 21 Nov 2018 13:33:54 +0100 Subject: [PATCH] Added Logger documentation. --- src/TNL/Containers/List.h | 1 + src/TNL/Logger.h | 20 +++++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/src/TNL/Containers/List.h b/src/TNL/Containers/List.h index 3954b014e1..96cd236f76 100644 --- a/src/TNL/Containers/List.h +++ b/src/TNL/Containers/List.h @@ -59,6 +59,7 @@ template< class T > class List /// Destroys the list. References to the values in the list become invalid. ~List(); + /// Returns the type of list. static String getType(); /// Returns \e true if the list contains no items, otherwise returns \e false. diff --git a/src/TNL/Logger.h b/src/TNL/Logger.h index bddcfeeebe..d73594d2cf 100644 --- a/src/TNL/Logger.h +++ b/src/TNL/Logger.h @@ -15,7 +15,7 @@ namespace TNL { -/// Vytvari tabulku s logem vypoctu +/// Creates calculations log in the form of a table. class Logger { public: @@ -36,12 +36,12 @@ class Logger /// \param title String containing the header title. void writeHeader( const String& title ); - /// \brief Creates separator for structuring the log. + /// \brief Creates separator used as a log structure. void writeSeparator(); /// \brief Inserts information about various system parameters into the log. /// - /// \param parameters is a container with configuration parameters + /// \param parameters A container with configuration parameters. bool writeSystemInformation( const Config::ParameterContainer& parameters ); ///// @@ -50,6 +50,14 @@ class Logger /// \param label Label to be printed to the log together with the current time. void writeCurrentTime( const char* label ); + /// \brief Inserts parameter information into the log. + /// + /// \tparam ParameterType Type of the parameter. + /// \param label Description/label of the line. + /// \param parameterName Name of the parameter. + /// \param parameters A container with configuration parameters. + /// \param parameterLevel Integer defining the indent used in the log. + // TODO: add units template< typename ParameterType > void writeParameter( const String& label, @@ -57,6 +65,12 @@ class Logger const Config::ParameterContainer& parameters, int parameterLevel = 0 ); + /// \brief Inserts parameter information into the log. + /// + /// \tparam ParameterType Type of the parameter. + /// \param label Description/label of the line. + /// \param value Parameter value. + /// \param parameterLevel Integer defining the indent used in the log. template< typename ParameterType > void writeParameter( const String& label, const ParameterType& value, -- GitLab