diff --git a/src/TNL/Containers/List.h b/src/TNL/Containers/List.h index c64a8a957b3d7106a8601a7033c169052f599362..2f53ccd8cf35152d539a06ac07cc0976ca9bd858 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 b690d610c10fa6f9c242d65679f959f08de9fcf0..c156113f094c84351c6d036a5e7f5ac2c752d071 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 c6e672d4fd863830a27652eebfdb67d613e2f73b..87298f9e4395a8b8e15ca1eb4b4675a4b8f57530 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 16acbbd21afe4094ab741f82fda0c0a3b4fb7b73..6c20c4abb2bf6bbd6216db9feeaea7ef06d72d6e 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