[asl] 81/177: Adding comments

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Aug 27 09:22:43 UTC 2015


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch master
in repository asl.

commit 3c9c68fe308c9209fe2926aaaf50e030dcd90be0
Author: Avtech Scientific <AvtechScientific at users.noreply.github.com>
Date:   Wed Jul 8 15:39:11 2015 +0300

    Adding comments
---
 examples/flow/locomotive_in_tunnel.cc |  2 +-
 src/utilities/aslParametersManager.h  | 48 +++++++++++++++++++++++++----------
 2 files changed, 36 insertions(+), 14 deletions(-)

diff --git a/examples/flow/locomotive_in_tunnel.cc b/examples/flow/locomotive_in_tunnel.cc
index 5bfbfd5..8c0279b 100644
--- a/examples/flow/locomotive_in_tunnel.cc
+++ b/examples/flow/locomotive_in_tunnel.cc
@@ -94,7 +94,7 @@ int main(int argc, char* argv[])
 	 "space step" - option description; is used in the help output:
 	 `locomotive_in_tunnel -h` and as comment on parameters file generation:
 	 `locomotive_in_tunnel -g ./defaultParameters.ini`
-	 "m" - parameter units; is used as part of the option description mentioned
+	 "m" - parameter units; is used to complement the option description mentioned
 	 above. Might be used for automatic unit conversion in future (to this end
 	 it is recommended to use the notation of the Boost::Units library). */
 	asl::Parameter<FlT> dx(0.08, "dx", "space step", "m");
diff --git a/src/utilities/aslParametersManager.h b/src/utilities/aslParametersManager.h
index c8fd07e..28db6e5 100644
--- a/src/utilities/aslParametersManager.h
+++ b/src/utilities/aslParametersManager.h
@@ -34,22 +34,44 @@ namespace asl
 
 	class PrefixStore;
 
-	/// This class stores parameter's value and the information
-	/// needed to extract it from command line and/or parameters file
-	/// \ingroup LDI
+	/** This class stores parameter's value and the information
+	 needed to extract it from command line and/or parameters file.
+	 Important: declare Parameters only after declaring ParametersManager or
+	 ApplicationParametersManager instance and before calling 
+	 ParametersManager::load() because each Parameter adds itself
+	 to the instance automatically!
+	\ingroup LDI */
 	template <typename T> class Parameter
 	{
 		public:
-			/// \p key is the parameter's identification key in the
-			/// parameters file. If no default value is specified, then the
-			/// parameter is required to be specified in the parameters file
-			/// or command line.
+			/**
+			  \p key_ - option key; is used to specify this parameter through
+			  command line and/or parameters file.
+			  \p description_ is used in the help output and as comment on
+			  parameters file generation.
+			  \units_ - parameter units; is used to complement the option
+			  description mentioned above. Might be used for automatic unit
+			  conversion in future (to this end it is recommended to use the
+			  notation of the Boost::Units library).
+			  Since no default value is specified, the parameter is required
+			  to be specified in the parameters file or command line.
+			*/
 			Parameter(const char* key_,
 			          const char* description_,
 			          const char* units_ = "");
-			/// \p key is the parameter's identification key in the parameters file
-			/// If a default value is specified, then the parameter is not
-			/// required to be specified in the parameters file or command line.	
+			/**
+			  \defaultValue - default parameter value. Since a default value is
+			  specified, the parameter is not required to be specified in the
+			  parameters file or command line.
+			  \p key_ - option key; is used to specify this parameter through
+			  command line and/or parameters file.
+			  \p description_ is used in the help output and as comment on
+			  parameters file generation.
+			  \units_ - parameter units; is used to complement the option
+			  description mentioned above. Might be used for automatic unit
+			  conversion in future (to this end it is recommended to use the
+			  notation of the Boost::Units library).
+			*/
 			Parameter(T defaultValue,
 			          const char* key_,
 			          const char* description_,
@@ -67,9 +89,9 @@ namespace asl
 
 
 	/** This class automatically accomodates newly created Parameters and then
-	can load them from a parameters file.
-	It has to be declared before declaring all the parameters it will manage!
-	\ingroup Utilities */
+	 can load them from a parameters file.
+	 It has to be declared before declaring all the parameters it will manage!
+	 \ingroup Utilities */
 	class ParametersManager
 	{
 		public:

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/asl.git



More information about the debian-science-commits mailing list