Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
dynamic-graph
Commits
e4d3adf6
Commit
e4d3adf6
authored
Jan 31, 2020
by
Joseph Mirabel
Committed by
olivier stasse
Jan 31, 2020
Browse files
Provide backward compatibility + reorganize headers.
parent
f17106c5
Changes
2
Hide whitespace changes
Inline
Side-by-side
include/dynamic-graph/logger.h
View file @
e4d3adf6
...
...
@@ -45,14 +45,18 @@ enum MsgType {
/* --- INCLUDE --------------------------------------------------------- */
/* --------------------------------------------------------------------- */
#include
<map>
/// \todo These 3 headers should be removed.
#include
<fstream>
#include
<iomanip>
// std::setprecision
#include
<sstream>
#include
<boost/assign.hpp>
#include
<boost/preprocessor/stringize.hpp>
#include
<dynamic-graph/deprecated.hh>
#include
<dynamic-graph/linear-algebra.h>
#include
<dynamic-graph/real-time-logger-def.h>
#include
<fstream>
#include
<iomanip>
// std::setprecision
#include
<map>
#include
<sstream>
namespace
dynamicgraph
{
...
...
@@ -217,6 +221,14 @@ public:
*/
void
sendMsg
(
std
::
string
msg
,
MsgType
type
,
const
std
::
string
&
lineId
=
""
);
/** \deprecated instead, use
* \code
* stream(type, lineId) << msg << '\n';
* \endcode
*/
void
sendMsg
(
std
::
string
msg
,
MsgType
type
,
const
std
::
string
&
file
,
int
line
)
DYNAMIC_GRAPH_DEPRECATED
;
/** Set the sampling time at which the method countdown()
* is going to be called. */
bool
setTimeSample
(
double
t
);
...
...
src/debug/logger.cpp
View file @
e4d3adf6
...
...
@@ -43,6 +43,13 @@ void Logger::sendMsg(std::string msg, MsgType type, const std::string &lineId) {
stream
(
type
,
lineId
)
<<
msg
<<
'\n'
;
}
void
Logger
::
sendMsg
(
std
::
string
msg
,
MsgType
type
,
const
std
::
string
&
file
,
int
line
)
{
std
::
ostringstream
oss
;
oss
<<
file
<<
line
;
stream
(
type
,
oss
.
str
())
<<
msg
<<
'\n'
;
}
bool
Logger
::
setTimeSample
(
double
t
)
{
if
(
t
<=
0.0
)
return
false
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment