BIND 10 trac1959, updated. fe103d1a3845a08dbf3d0af2bb3c17f10f78a6d7 [1959] Fixed doxygen comments in CommandOptionsHelper class.

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Sep 5 16:16:54 UTC 2012


The branch, trac1959 has been updated
       via  fe103d1a3845a08dbf3d0af2bb3c17f10f78a6d7 (commit)
      from  9f8954c665a65233a6c697be3769f02d702a2728 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit fe103d1a3845a08dbf3d0af2bb3c17f10f78a6d7
Author: Marcin Siodelski <marcin at isc.org>
Date:   Wed Sep 5 18:16:33 2012 +0200

    [1959] Fixed doxygen comments in CommandOptionsHelper class.

-----------------------------------------------------------------------

Summary of changes:
 .../tools/perfdhcp/tests/command_options_helper.h  |   44 +++++++++++++++++---
 1 file changed, 38 insertions(+), 6 deletions(-)

-----------------------------------------------------------------------
diff --git a/tests/tools/perfdhcp/tests/command_options_helper.h b/tests/tools/perfdhcp/tests/command_options_helper.h
index 5886c1f..860a040 100644
--- a/tests/tools/perfdhcp/tests/command_options_helper.h
+++ b/tests/tools/perfdhcp/tests/command_options_helper.h
@@ -29,7 +29,7 @@ namespace perfdhcp {
 /// This helper class can be shared between unit tests that
 /// need to initialize CommandOptions objects and feed it with
 /// specific command line. The command line can be given as a
-/// string represinting program name, options and arguments.
+/// string representing program name, options and arguments.
 /// The static method exposed by this class can be used to
 /// tokenize this string into array of C-strings that are later
 /// consumed by \ref CommandOptions::parse. The state of the
@@ -39,12 +39,21 @@ namespace perfdhcp {
 class CommandOptionsHelper {
 public:
 
+    /// \brief Wrapper class for allocated argv[] array.
+    ///
+    /// This class wraps allocated char** array and ensures that memory
+    /// allocated for this array is freed at the end o the scope.
     class ArgvPtr {
     public:
+        /// \brief Constructor.
+        ///
+        /// \param argv array of C-strings.
+        /// \param number of C-strings in the array.
         ArgvPtr(char** argv, int argc) : argv_(argv), argc_(argc) { }
-        char** getArgv() const { return(argv_); }
-        int getArgc() const { return(argc_); }
 
+        /// \brief Destructor.
+        ///
+        /// Dealocates wrapped array of C-strings.
         ~ArgvPtr() {
             if (argv_ != NULL) {
                 for(int i = 0; i < argc_; ++i) {
@@ -55,11 +64,29 @@ public:
             }
         }
 
+        /// \brief Return the array of C-strings.
+        ///
+        /// \return array of C-strings.
+        char** getArgv() const { return (argv_); }
+
+        /// \brief Return C-strings counter.
+        ///
+        /// \return C-strings counter.
+        int getArgc() const { return(argc_); }
+
     public:
-        char** argv_;
-        int argc_;
+        char** argv_; ///< array of C-strings being wrapped.
+        int argc_;    ///< number of C-strings.
     };
 
+    /// \brief Parse command line provided as string.
+    ///
+    /// Method transforms the string representing command line
+    /// to the array of C-strings consumed by the
+    /// \ref CommandOptions::parse function and performs
+    /// parsing.
+    ///
+    /// \param cmdline command line provided as single string.
     static void process(const std::string& cmdline) {
         CommandOptions& opt = CommandOptions::instance();
         int argc = 0;
@@ -71,6 +98,11 @@ public:
 
 private:
 
+    /// \brief Split string to the array of C-strings.
+    ///
+    /// \param text_to_split string to be splited.
+    /// \param [out] num number of substrings returned.
+    /// \return array of C-strings created from split.
     static char** tokenizeString(const std::string& text_to_split, int& num) {
         char** results = NULL;
         // Tokenization with std streams
@@ -100,7 +132,7 @@ private:
     }
 };
 
-} // namespace perfdhcp
+} // namespace isc::perfdhcp
 } // namespace isc
 
 #endif // __COMMAND_OPTIONS_HELPER_H



More information about the bind10-changes mailing list