fw4spl
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
ProgressToLogger.cpp
1
/* ***** BEGIN LICENSE BLOCK *****
2
* FW4SPL - Copyright (C) IRCAD, 2009-2015.
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
#include "fwTools/ProgressToLogger.hpp"
8
9
#include <fwCore/base.hpp>
10
11
namespace
fwTools
12
{
13
14
ProgressToLogger::ProgressToLogger
(std::string prefix, std::string postfix) : m_prefix(prefix),
15
m_postfix(postfix)
16
{
17
}
18
19
ProgressToLogger::~ProgressToLogger
()
20
{
21
// TODO Auto-generated destructor stub
22
}
23
24
25
void
ProgressToLogger::operator()
(
float
percent,std::string msg)
26
{
27
// fixme io precision
28
OSLM_INFO
( m_prefix << msg <<
" "
<< (
int
) (percent*100) << m_postfix);
29
}
30
31
}
fwTools::ProgressToLogger::operator()
FWTOOLS_API void operator()(float percent, std::string msg)
the handler effective code : send formated progress information to the log system SpyLog...
Definition:
ProgressToLogger.cpp:25
fwTools
The namespace fwTools contains several tools like UUID, factory, dispatche, stringizer, macros, helper.
Definition:
core/fwCamp/include/fwCamp/registry/detail.hpp:21
OSLM_INFO
#define OSLM_INFO(message)
Definition:
spyLog.hpp:252
fwTools::ProgressToLogger::ProgressToLogger
FWTOOLS_API ProgressToLogger(std::string prefix, std::string postfix=" %")
constructor : define an output to log system as : [prefix] message percent [postfix] ...
Definition:
ProgressToLogger.cpp:14
fwTools::ProgressToLogger::~ProgressToLogger
virtual FWTOOLS_API ~ProgressToLogger()
default destructor, do nothing
Definition:
ProgressToLogger.cpp:19
SrcLib
core
fwTools
src
fwTools
ProgressToLogger.cpp
Generated on Wed Sep 5 2018 12:47:56 for fw4spl by
1.8.11