示例#1
0
//! Gets the global Message.
dmz::Message
dmz::Definitions::get_global_message () const {

   Message result;

   if (_state.context) {

      RuntimeContextMessaging *rcm = _state.context->get_messaging_context ();

      if (rcm) {

         rcm->ref ();

         result = rcm->globalType;

         rcm->unref ();
      }
      else if (_state.log) {

         _state.log->error << "Internal Error, Unable to get Global Message Type."
            << endl;
      }
   }
   else if (_state.log) {

      _state.log->error << "NULL Runtime context. Unable to get Global Message Type."
         << endl;
   }

   return result;
}
示例#2
0
   MessageObserverState (
         const Handle TheHandle,
         const String &TheName,
         RuntimeContext *theContext) :
         ObsHandle (TheHandle),
         Name (TheName),
         handlePtr (0),
         context (0) {

      if (theContext) {

         context = theContext->get_messaging_context ();

         if (!ObsHandle) {

            handlePtr = new RuntimeHandle (TheName + ".MessageObserver", theContext);
         }
      }

      if (context) { context->ref (); }
   }
示例#3
0
   ~MessageObserverState () {

      if (context) { context->unref (); context = 0; }
      if (handlePtr) { delete handlePtr; handlePtr = 0; }
      msgTable.empty ();
   }
示例#4
0
   ~MessageObserverState () {

      if (dispatch) { dispatch->unref (); dispatch = 0; }
      if (handlePtr) { delete handlePtr; handlePtr = 0; }
      msgTable.empty ();
   }