/***************************************************************************
 *                          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 INodeService
 *   The service manages INodeFilter interfaces. The scene uses this
 *   service for filtering out-tree data.
 *--------------------------------------------------------------------------
 * @created: Tuesday, April 20, 2004 12:19:50
 */

#if !defined(INodeService_h_included)
#define INodeService_h_included
//forward declaration of this class might require
namespace services
{ class INodeService; };
#include <zmodeler.h>
#include <core/coreTypes.h>
#include <services/zmServices.h>
#include <services/IService.h>
#include <scene/INode.h>
#include <scene/INodeFilter.h>


namespace services
{
  
  class INodeService : public services::IService
  {
  public:
    /* Sets active filters collection. Pass NULL to disable all filters. */
    virtual ZRESULT setActiveFilters(scene::CNodeFilterCol* pFilters)=0;
    virtual ZRESULT getActiveFilters(scene::CNodeFilterCol** ppFilters)=0;
    virtual ZRESULT installFilter(ZString strClassName)=0;
    virtual ZRESULT activateFilter(ZString strName, bool bActivate=true)=0;
    /* Filters the tree */
    virtual ZRESULT filter(scene::INode* pInRoot, scene::INode** pOutRoot)=0;
    virtual ZRESULT getFilterByName(ZString strName, scene::INodeFilter** ppFilter)=0;
    /* Registers a node's classname for supplied InterfaceID. */
    virtual ZRESULT installNodeClass(ZString strClassName, ZString strInterfaceID)=0;
    /* Creates a node for supplied interface. QueryInterface is performed on the
     * created node with ret-val arg. If succeed, the ret-val void* points to requested
     * interface. */
    virtual ZRESULT createNode(ZString strInterfaceID, void** ppInterface)=0;
  
  };//class INodeService
};//services

#endif
