LCOV - code coverage report
Current view: top level - data - Progress.h (source / functions) Hit Total Coverage
Test: Lexis Lines: 3 3 100.0 %
Date: 2017-10-26 03:19:55 Functions: 3 4 75.0 %

          Line data    Source code
       1             : 
       2             : /* Copyright (c) 2016, Human Brain Project
       3             :  *                     Stefan.Eilemann@epfl.ch
       4             :  */
       5             : 
       6             : #ifndef LEXIS_DATA_PROGRESS_H
       7             : #define LEXIS_DATA_PROGRESS_H
       8             : 
       9             : #include <lexis/api.h>
      10             : #include <lexis/data/detail/progress.h> // base class
      11             : 
      12             : namespace lexis
      13             : {
      14             : namespace data
      15             : {
      16             : /** Drop-in progress meter for boost::progress_display. */
      17           5 : class Progress : public detail::Progress
      18             : {
      19             : public:
      20             :     LEXIS_API explicit Progress( unsigned long expected );
      21             :     LEXIS_API Progress( const std::string& operation,
      22             :                               unsigned long expected );
      23             : 
      24             :     LEXIS_API void restart( unsigned long expected );
      25             :     LEXIS_API unsigned long operator+=( unsigned long inc );
      26           3 :     unsigned long operator++() { return operator += ( 1 ); }
      27           2 :     unsigned long count() const { return _count; }
      28             : 
      29             : private:
      30             :     unsigned long _update();
      31             : 
      32             :     unsigned long _expected;
      33             :     unsigned long _count;
      34             : };
      35             : }
      36             : }
      37             : 
      38             : #endif

Generated by: LCOV version 1.11