/***************************************************************************
 *                          Zanoza Modeler v2.x                            *
 *      This is unpublished propietary source code of Zanoza Software.     *
 *      The copyright notice does not evidence any actual or intended      *
 *                    publication of such source code.                     *
 *                                                                         *
 *                Copyright (c) 2002-2008 Zanoza Software.                 *
 *                                                                         *
 *                        All rights reserved.                             *
 ***************************************************************************
 *--------------------------------------------------------------------------
 * @author:   Oleg Melashenko
 *--------------------------------------------------------------------------
 * @purpose:  Declaration of the class IEventDispatcher
 *   Accepts events and dispatches them to internal set of handlers
 *--------------------------------------------------------------------------
 * @created: Monday, October 28, 2002 23:36:25
 */

#if !defined(IEventDispatcher_h_included)
#define IEventDispatcher_h_included
//forward declaration of this class might require
namespace core
{ namespace events
  { class IEventDispatcher; }; };
#include <zmodeler.h>
#include <core/events/eventsTypes.h>
#include <core/events/IEventHandler.h>


namespace core
{
  namespace events
  {
    
    class IEventDispatcher : public ZUnknown
    {
    public:
      virtual ZRESULT setEventHandler(tEvent kind, core::events::IEventHandler* pHandler, core::eBooleanOperation how, core::ePriority nPriority=core::EP_DEFAULT)=0;
      /* Provides collection of event-handlers. Collection is proirity-ordered. */
      virtual ZRESULT getEventHandlers(tEvent kind, CEventHandlerCol** ppHandlers)=0;
      virtual ZRESULT raiseEvent(tEvent kind, long num, ZBlackBox* pBox)=0;
    
    };//class IEventDispatcher
  };//events
};//core

#endif
