00001 #include <console_bridge/console.h> 00002 #include <rosconsole_bridge/bridge.h> 00003 00004 struct A { 00005 A(const char* hint) { 00006 logWarn("initializing class: %s", hint); 00007 } 00008 ~A() { 00009 logWarn("destroying class"); 00010 } 00011 }; 00012 00013 // destructor of static instance should use the original output handler 00014 static A a("static"); 00015 00016 REGISTER_ROSCONSOLE_BRIDGE; 00017 00018 int main(int argc, char **argv) 00019 { 00020 A a("local"); 00021 return 0; 00022 }