/***************************************************************************
 *                          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 IModeler
 *   Main interface that provides pointers to variuse ZModeler's resources.
 *--------------------------------------------------------------------------
 * @created: Friday, September 20, 2002 14:49:33
 */

#if !defined(IModeler_h_included)
#define IModeler_h_included
//forward declaration of this class might require
namespace core
{ class IModeler; };
#include <zmodeler.h>
#include <core/coreTypes.h>
#include <core/events/eventsTypes.h>
#include <core/IRepository.h>
#include <core/ui/IUIManager.h>
#include <core/events/IEventDispatcher.h>
#include <scene/IScene.h>
#include <core/IProcParams.h>
#include <core/ICompatibilityInfo.h>


namespace core
{
  
  class IModeler : public ZUnknown
  {
  public:
    virtual ZRESULT getVersion(ZString& strVersion) const=0;
    virtual ZRESULT getRepository(core::IRepository** ppRepository)=0;
    virtual ZRESULT getUIManager(core::ui::IUIManager** ppUIManager)=0;
    virtual ZRESULT getEventDispatcher(events::tEvent kind, core::events::IEventDispatcher** ppDispatcher)=0;
    virtual ZRESULT setEventDispatcher(events::tEvent kind, core::events::IEventDispatcher* pDispatcher)=0;
    virtual ZRESULT getToolsSelection(core::tools::tToolInfoSeq& seqTools)=0;
    /* Provides interface to currently selected rendering device. */
    virtual ZRESULT getDefaultDevice(IDevice** ppDevice)=0;
    /* Sets current device. */
    virtual ZRESULT setDefaultDevice(IDevice* pDevice)=0;
    virtual ZRESULT getScene(scene::IScene** ppScene)=0;
    /* Provides last-used proc params. They appears to be the same as passed to
     * IActionHandler::apply, but not guarateed to be exactly the same. Amyway, this
     * is a point where the tool can safely gain pointer to IProcParams at any time. */
    virtual ZRESULT getProcParams(core::IProcParams** ppParams)=0;
    virtual ZRESULT addCompatibility(core::ICompatibilityInfo* pCap)=0;
    virtual ZRESULT getCompatibilities(core::CCompatibilityInfoCol** allComps)=0;
    virtual ZRESULT setCurrentCompatibility(core::ICompatibilityInfo* pComp)=0;
    virtual ZRESULT getCurrentCompatibility(core::ICompatibilityInfo** ppComp)=0;
    /* Specifies whether current registration code CRC is valid. 
     * This is a simple way to verify availability of registration code,
     * so your registration-dependant options could use this method.
     * Actual code validation and verification is not performed
     * by this method, so even if it returns ZRESULT_OK, an invalid
     * code might be installed. However, there are no open methods
     * to get or validate core, and you know why. :) */
    virtual ZRESULT isValidCodeCRC(void)=0;
  
  };//class IModeler
};//core

#endif
