Exemple #1
0
/*!

\brief PluginInfo constructor.
\param[in] Info PluginInfo used for setting the observers name, handle, and runtime
context.
\note This constructor is intended for Plugins that wish to receive messages.
The observer will have the same name and runtime handle as the plugin using this
constructor.

*/
dmz::MessageObserver::MessageObserver (const PluginInfo &Info) :
      _msgObsState (*(new MessageObserverState (
         Info.get_handle (),
         Info.get_name (),
         Info.get_context ()))) {

   if (_msgObsState.context) { _msgObsState.context->add_observer (*this); }
}
Exemple #2
0
/*!

\brief PluginInfo construct.
\param[in] Info PluginInfo object containing Handle and RuntimeContext.

*/
dmz::UndoObserver::UndoObserver (const PluginInfo &Info) :
      __state (*(new State (Info.get_handle (), Info.get_context ()))) {

   if (__state.handle && __state.context) {

      if (!__state.context->obsTable.store (__state.handle, this)) {

         __state.handle = 0;
      }
   }
}
Exemple #3
0
/*!

\brief Stores an interface with a unique handle using the PluginInfo.
\details Defined in dmzRuntimeRTTI.h.
\param[in] InterfaceName String containing name of interface.
\param[in] Info PluginInfo containing unique handle and runtime context.
\param[in] ptr Void pointer to the interface.
\return Returns dmz::True if the interface was successfully stored with the specified
handle and name.

*/
dmz::Boolean
dmz::store_rtti_interface (
      const String &InterfaceName,
      const PluginInfo &Info,
      void *ptr) {

   return store_rtti_interface (
      InterfaceName,
      Info.get_handle (),
      Info.get_context (),
      ptr);
}
/*!

\brief Constructor.
\param[in] Info Reference to the PluginInfo.

*/
dmz::ResourcesObserver::ResourcesObserver (const PluginInfo &Info) :
      __state (*(new State (Info.get_handle (), Info.get_name (), Info.get_context ()))) {
}