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 }
CONSOLE_BRIDGE_logWarn
#define CONSOLE_BRIDGE_logWarn
Definition: cleanup.cpp:7
main
int main(int argc, char **argv)
Definition: cleanup.cpp:24
A
Definition: cleanup.cpp:10
a
static A a("static")
A::~A
~A()
Definition: cleanup.cpp:14
REGISTER_ROSCONSOLE_BRIDGE
REGISTER_ROSCONSOLE_BRIDGE
Definition: cleanup.cpp:22
bridge.h
A::A
A(const char *hint)
Definition: cleanup.cpp:11


rosconsole_bridge
Author(s): Ioan Sucan , Dirk Thomas
autogenerated on Wed Mar 2 2022 00:54:15