// //////////////////////////////////////////////////////// // Lecture on the CORBA Component Model, summer term 2003 // Assignment 3+, Stephan Brumme, 702544 // // Some generic helper functions // #ifndef _HELPER_H_INCLUDED #define _HELPER_H_INCLUDED #include // exits the program if the given CORBA::object_var satisfies CORBA::is_nil template void CorbaAssert(const P object, const char* msg, const unsigned int code = 1) { if (CORBA::is_nil(object)) CorbaError(msg, code); } // displays a given error message and exits the program void CorbaError(const char* msg, const unsigned int code = 1) { std::cerr << msg << std::endl; exit(code); } #endif // _HELPER_H_INCLUDED