/*=========================================================================*/
/* OBJDLLb.hpp :       base of objects DLL*/
/* This is a part of the CPA project.*/
/**/
/* Version                      1.0*/
/* Creation date        10/06/96*/
/* Revision date*/
/**/
/* (c) Ubi Studio 1996*/
/**/
/* DO NOT MODIFY THAT FILE. IF SOMETHING NEEDS TO BE CHANGE, PLEASE CONTACT*/
/* VINCENT GRECO OR CHRISTOPHE BEAUDET.*/
/*=========================================================================*/
 
#ifndef __OBJDLLB_HPP__
#define __OBJDLLB_HPP__
 
/****************************************/
#ifndef CPA_EXPORT
#if defined(CPA_WANTS_IMPORT)
#define CPA_EXPORT __declspec(dllimport)
#elif defined(CPA_WANTS_EXPORT)
#define CPA_EXPORT __declspec(dllexport)
#else
#define CPA_EXPORT
#endif
#endif
/****************************************/
 
 
#ifdef ACTIVE_EDITOR
 
#include "CPADLLb.hpp"
 
/* need these class*/
class CPA_MainWorld;
class CPA_World;
class EDT_Model;
 
 
/*##########################################################################*/
/* Definition of an object DLL*/
typedef struct tdstObjectDLLDef_
{
}
tdstObjectDLLDef;
 
class CPA_ObjectDLLBase;
 
class CPA_Object;
 
/*##########################################################################*/
/* object DLL Base Class*/
class CPA_EXPORT CPA_ObjectDLLBase : public CPA_DLLBase
{
protected:
    tdstObjectDLLDef m_stObjectDLLDefinition;
 
public:
/* constructor*/
    CPA_ObjectDLLBase() {};
    ~CPA_ObjectDLLBase() {};
 
/* get parameters*/
	tdstObjectDLLDef *GetDefinition(void)	{ return &m_stObjectDLLDefinition; }
 
/* hierarchy*/
	virtual CPA_SuperObject *	GetNewEditorInstance		(HIE_tdxHandleToSuperObject pEngineInstance) { return NULL; }
	virtual void				fn_vBuildNewEditorInstance	(CPA_SuperObject *pEditorInstance, HIE_tdxHandleToSuperObject pEngineInstance) { }
	virtual void				fn_vUpdateEditorInstance	(CPA_SuperObject *pEditorInstance, HIE_tdxHandleToSuperObject pEngineInstance) { }
	virtual BOOL				fn_bCanHandleThisType		(long lEngineType) { return FALSE; }
/* models & instances*/
	virtual void			fn_vInitListByType		(CPA_World *pWorld)	{ }
	virtual void			fn_vInitListsOfModels	(void)				{ }
	virtual void			fn_vSaveListModels		(CString csListName, CPA_List<EDT_Model> *pListModels) { }
	virtual CString			fn_csLoadListModels		(void)				{ return ""; }
	virtual EDT_Model		* GetNewModel			(CString csListName)	{ return NULL; }
	virtual BOOL			fn_bCanLoadNewModel		(CString csListName)	{ return FALSE; }
	virtual BOOL			fn_bCanDeleteModel		(CString csListName)	{ return FALSE; }
	virtual BOOL			fn_bCanChangeModelIcon	(CString csListName)	{ return FALSE; }
	virtual BOOL			fn_bCanSaveListModels	(CString csListName)	{ return FALSE; }
	virtual BOOL			fn_bCanLoadListModels	(void)				{ return FALSE; }
	virtual void			fn_vOnLoadNewModel		(CString csListName, EDT_Model *pNewModel) { }
	virtual CString			fn_csChangeModelIcon	(CString csListName, CString csModelName) { return "";}
 
	virtual CPA_SuperObject * GetNewInstance		 (CString csTypeName, CString csModelName, CPA_SuperObject *pParent) { return NULL; }
	virtual tdeTypeSO		  GetTypeInstance		 (CString csTypeName, CString csModelName) { return C_NoType; }
/*ANNECY Shaitan EmptySectors 25/02/98*/
	virtual tdeSaveStatus	  GetStatusInstance		 (CString csTypeName, CString csModelName) { return E_ss_NoStatus; }
/*ENDANNECY Shaitan EmptySectors*/
	virtual CPA_SuperObject * GetParentForInsertion	 (CString csTypeName, CString csModelName, tdstPosition *p_stPosition) { return NULL; }
	virtual BOOL			fn_bChooseInsertPosition (CPA_SuperObject *pNewInstance, CPA_SuperObject *pParent, tdstPosition *p_stPosition) { return FALSE; }
 
/* objects*/
	virtual CPA_BaseObject * GetNewObject (CString csObjectFile, CString csObjectName, FILE *p_fFile, CPA_MainWorld *p_oMainWorld) { return NULL; }
	virtual CPA_BaseObject * Duplicate	  (CPA_BaseObject *pObject, CPA_SuperObject *pNewSuperObject) { return NULL; }
 
	virtual CPA_SuperObject * GetCopyOfProtectedChild (CPA_SuperObject *pInitialChild, CPA_SuperObject *pNewOwner) { return NULL; }
 
/* permissions for EvtEditor*/
	virtual BOOL fn_bAcceptAsParent			(CPA_BaseObject *pChild, CPA_BaseObject *pParent)  { return TRUE; }
	virtual BOOL fn_bAcceptAsChild			(CPA_BaseObject *pParent, CPA_BaseObject *pChild)  { return TRUE; }
 
/* for bounding volumes*/
	virtual void fn_vComputeBoundingVolume(CPA_BaseObject *pObject) {};
	virtual ACP_tdxHandleOfObject fn_hGetBoundingVolume(CPA_BaseObject *_pObj) { return NULL; }
 
/* when insertion is canceled*/
	virtual void fn_vOnCancelInsertion (CPA_SuperObject *pInstance);
	
/* Shaitan Scale {*/
	/* to scale editor objects*/
	virtual CPA_SuperObject * GetVisualSuperObject (CPA_SuperObject *pInstance) { return NULL; }
/*End Shaitan Scale }*/
	
};
 
#endif /* ACTIVE_EDITOR*/
#endif /* __OBJDLLB_HPP__*/
