Main Page
Namespaces
Classes
Files
File List
File Members
test
cleanup.cpp
Go to the documentation of this file.
1
#include <console_bridge/console.h>
2
#include <
rosconsole_bridge/bridge.h
>
3
4
// Remove this when no longer supporting platforms with libconsole-bridge-dev < 0.3.0,
5
// in particular Debian Jessie: https://packages.debian.org/jessie/libconsole-bridge-dev
6
#ifndef CONSOLE_BRIDGE_logWarn
7
#define CONSOLE_BRIDGE_logWarn logWarn
8
#endif
9
10
struct
A
{
11
A
(
const
char
* hint) {
12
CONSOLE_BRIDGE_logWarn
(
"initializing class: %s"
, hint);
13
}
14
~A
() {
15
CONSOLE_BRIDGE_logWarn
(
"destroying class"
);
16
}
17
};
18
19
// destructor of static instance should use the original output handler
20
static
A
a
(
"static"
);
21
22
REGISTER_ROSCONSOLE_BRIDGE
;
23
24
int
main
(
int
argc,
char
**argv)
25
{
26
A
a
(
"local"
);
27
return
0;
28
}
A::~A
~A()
Definition:
cleanup.cpp:14
main
int main(int argc, char **argv)
Definition:
cleanup.cpp:24
a
static A a("static")
CONSOLE_BRIDGE_logWarn
#define CONSOLE_BRIDGE_logWarn
Definition:
cleanup.cpp:7
REGISTER_ROSCONSOLE_BRIDGE
REGISTER_ROSCONSOLE_BRIDGE
Definition:
cleanup.cpp:22
A
Definition:
cleanup.cpp:10
A::A
A(const char *hint)
Definition:
cleanup.cpp:11
bridge.h
rosconsole_bridge
Author(s): Ioan Sucan
autogenerated on Thu Mar 7 2019 03:49:43