fw4spl
ProgressToLogger.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2017.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #ifndef __FWTOOLS_PROGRESSTOLOGGER_HPP__
8 #define __FWTOOLS_PROGRESSTOLOGGER_HPP__
9 
10 #include <fwTools/config.hpp>
11 
12 #include <boost/signals2.hpp>
13 
14 #include <string>
15 
16 namespace fwTools
17 {
18 
24 class FWTOOLS_CLASS_API ProgressToLogger : public ::boost::signals2::trackable
25 {
26 public:
27 
33  FWTOOLS_API ProgressToLogger(std::string prefix, std::string postfix = " %");
34 
36  FWTOOLS_API virtual ~ProgressToLogger();
37 
42  FWTOOLS_API void operator()(float percent, std::string msg);
43 
44 protected:
45 
46  std::string m_prefix;
47  std::string m_postfix;
48 };
49 
50 }
51 
52 #endif /* __FWTOOLS_PROGRESSTOLOGGER_HPP__ */
The namespace fwTools contains several tools like UUID, factory, dispatche, stringizer, macros, helper.
Class ProgressToLogger is an ProgressAdviser::ProgressHandler, it receive notification from its Progr...