cleanup.cpp
Go to the documentation of this file.
1 #include <console_bridge/console.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 
23 
24 int main(int argc, char **argv)
25 {
26  A a("local");
27  return 0;
28 }
~A()
Definition: cleanup.cpp:14
int main(int argc, char **argv)
Definition: cleanup.cpp:24
static A a("static")
#define CONSOLE_BRIDGE_logWarn
Definition: cleanup.cpp:7
REGISTER_ROSCONSOLE_BRIDGE
Definition: cleanup.cpp:22
Definition: cleanup.cpp:10
A(const char *hint)
Definition: cleanup.cpp:11


rosconsole_bridge
Author(s): Ioan Sucan
autogenerated on Thu Mar 7 2019 03:49:43