From 7f6aced6efdf99e140fdac06a2c15f3db344150b Mon Sep 17 00:00:00 2001
From: Nina Dzugasova <dzugasova.nina@gmail.com>
Date: Thu, 15 Nov 2018 14:14:03 +0100
Subject: [PATCH] Added documentation into Containers/List.

---
 src/TNL/Containers/List.h   | 63 ++++++++++++++++++++++---------------
 src/TNL/File.h              |  4 +--
 src/TNL/Logger.h            |  5 ++-
 src/UnitTests/TimerTest.cpp |  8 +++--
 4 files changed, 50 insertions(+), 30 deletions(-)

diff --git a/src/TNL/Containers/List.h b/src/TNL/Containers/List.h
index c64a8a957b..2f53ccd8cf 100644
--- a/src/TNL/Containers/List.h
+++ b/src/TNL/Containers/List.h
@@ -43,27 +43,34 @@ template< class T > class List
    public:
       typedef T ValueType;
 
-      //! Basic constructor
+      /// \brief Basic constructor.
+      ///
+      /// Constructs an empty list.
       List();
 
-      //! Copy constructor
+      /// \brief Copy constructor.
+      ///
+      /// Construct a copy of \e list.
+      /// @param list Name of another list.
       List( const List& list );
 
-      //! Destructor
+      /// \brief Destructor.
+      ///
+      /// Destroys the list. References to the values in the list become invalid.
       ~List();
 
       static String getType();
 
-      //! If the list is empty return 'true'
+      /// Returns \e true if the list contains no items, otherwise returns \e false.
       bool isEmpty() const;
 
-      //! Return size of the list
+      /// Returns number of items in the list.
       int getSize() const;
 
-      //! Indexing operator
+      /// Indexing operator.
       T& operator[] ( const int& ind );
 
-      //! Indexing operator for constant instances
+      /// Indexing operator for constant instances.
       const T& operator[] ( const int& ind ) const;
 
       const List& operator = ( const List& lst );
@@ -72,64 +79,70 @@ template< class T > class List
 
       bool operator != ( const List& lst ) const;
 
-      //! Append new data element
+      /// \brief Appends new data element.
+      ///
+      /// Inserts \e data at the end of the list.
       bool Append( const T& data );
 
-      //! Prepend new data element
+      /// \brief Prepends new data element.
+      ///
+      /// Inserts \e data at the beginning of the list.
       bool Prepend( const T& data );
 
-      //! Insert new data element at given position
+      /// \brief Inserts new data element at given position.
+      ///
+      /// Inserts \e data at index position \e ind in the list.
       bool Insert( const T& data, const int& ind );
 
-      //! Append copy of another list
+      /// Appends copy of another list.
       bool AppendList( const List< T >& lst );
 
-      //! Prepend copy of another list
+      /// Prepends copy of another list.
       bool PrependList( const List< T >& lst );
 
       template< typename Array >
       void toArray( Array& array );
 
-      //! Erase data element at given position
+      /// Erases data element at given position.
       void Erase( const int& ind );
 
-      //! Erase data element with contained data at given position
+      /// Erases data element with contained data at given position.
       void DeepErase( const int& ind );
 
-      //! Erase all data elements
+      /// Erases all data elements.
       void reset();
 
-      //! Erase all data elements with contained data
+      /// Erases all data elements with contained data.
       void DeepEraseAll();
 
-      //! Save the list in binary format
+      /// Saves the list in binary format.
       bool Save( File& file ) const;
 
-      //! Save the list in binary format using method save of type T
+      /// Saves the list in binary format using method save of type T.
       bool DeepSave( File& file ) const;
 
-      //! Load the list
+      /// Loads the list.
       bool Load( File& file );
 
-      //! Load the list using method Load of the type T
+      /// Loads the list using method Load of the type T.
       bool DeepLoad( File& file );
  
    protected:
-      //! Pointer to the first element
+      /// Pointer to the first element.
       ListDataElement< T >* first;
 
-      //! Pointer to the last element
+      /// Pointer to the last element.
       /*! We use pointer to last element while adding new element to keep order of elements
        */
       ListDataElement< T >* last;
 
-      //! List size
+      /// List size.
       int size;
 
-      //! Iterator
+      /// Iterator.
       mutable ListDataElement< T >* iterator;
 
-      //! Iterator index
+      /// Iterator index.
       mutable int index;
 };
 
diff --git a/src/TNL/File.h b/src/TNL/File.h
index b690d610c1..c156113f09 100644
--- a/src/TNL/File.h
+++ b/src/TNL/File.h
@@ -76,13 +76,13 @@ class File
       return this->fileName;
    }
 
-   /// Returns read elements.
+   /// Returns number of read elements.
    long int getReadElements() const
    {
       return this->readElements;
    }
 
-   /// Returns written elements.
+   /// Returns number of written elements.
    long int getWrittenElements() const
    {
       return this->writtenElements;
diff --git a/src/TNL/Logger.h b/src/TNL/Logger.h
index c6e672d4fd..87298f9e43 100644
--- a/src/TNL/Logger.h
+++ b/src/TNL/Logger.h
@@ -19,6 +19,7 @@ class Logger
 {
    public:
 
+   /////
    /// \brief Basic constructor.
    ///
    /// \param _width Integer that defines the width of logger.
@@ -26,6 +27,7 @@ class Logger
    Logger( int _width,
               std::ostream& _stream );
 
+   /////
    /// \brief Creates header in given logger.
    ///
    /// \param title String desribing the title/header.
@@ -34,11 +36,12 @@ class Logger
    /// \brief Creates predefined separator - structure in the logger.
    void writeSeparator();
 
-   /// \brief Inserts information about system parameters into logger.
+   /// \brief Inserts information about various system parameters into logger.
    ///
    /// \param parameters
    bool writeSystemInformation( const Config::ParameterContainer& parameters );
 
+   /////
    /// \brief Inserts a line with current time into logger.
    ///
    /// \param label Description of the current time line.
diff --git a/src/UnitTests/TimerTest.cpp b/src/UnitTests/TimerTest.cpp
index 16acbbd21a..6c20c4abb2 100644
--- a/src/UnitTests/TimerTest.cpp
+++ b/src/UnitTests/TimerTest.cpp
@@ -24,9 +24,13 @@ TEST( TimerTest, Constructor )
     Timer time;
     time.reset();
     EXPECT_EQ(time.getRealTime(),0);
-    time.start();
+    /*time.start();
+    EXPECT_FALSE(time.stopState);
+
     time.stop();
-    EXPECT_NE(time.getRealTime(),0);
+    EXPECT_TRUE(time.stopState);
+
+    EXPECT_NE(time.getRealTime(),0);*/
 }
 #endif
 
-- 
GitLab