/*=========================================================================
* 
* edit_ipo.hpp :  EditorIPO class - definition
* 
* Version			3.0
* Creation date		22/05/97	Author : Vincent Lhullier	
* Revision date		26/06/97	Author : Shaitan	
*					02/07/97	Author : Vincent Lhullier	
*					18/08/97	Author : Shaitan	
*
* Shaitan
*=======================================================================*/
 
 
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
#ifndef __EDIT_IPO_HPP__
#define __EDIT_IPO_HPP__
 
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 
#include "ITF.h"
#include "incGAM.h"
 
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 
#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
 
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 
#include "PO.h"
#include "IPO.h"
#include "OPD.h"
 
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
 
typedef IPO_tdxHandleToInstanciatedPhysicalObject IPO_tdxHandleToIPO;
 
/*===========================================================================
*		Description:	class EditorIPO
*		Creation date:	
*		Author:			Vincent Lhullier
*---------------------------------------------------------------------------
*		Revision date:  18/08/97		Author: Shaitan       
*=========================================================================*/
 
class EditorIPO : public CPA_SaveObject,
				  public CPA_EdMot<IPO_tdxHandleToIPO>
{
  private:
	EditorPO			*m_p_oPhysicalObject;
	unsigned long		m_ulType;
/*	CPA_SectionObject	*m_pSectionRLI;*/
 
  public:
	/* ==> constructors/destructors */
	EditorIPO ( CPA_ObjectDLLBase	*p_oDLL, 
				IPO_tdxHandleToIPO	hObj,
				CString				csName, 
				CString				csFileName, 
				CString				csSectionName,
				BOOL				bExistingSection,
				unsigned long		ulType
				);
 
	EditorIPO (EditorIPO &r_oSource);
 
	~EditorIPO (void);
 
	/*==> Inits for scritps and engine struct*/
	static void StaticInit();
 
	/*==> Access functions*/
	void				*GetEngineStruct	  (void)					{ return GetStruct(); };
	void				SetEngineStruct		  (IPO_tdxHandleToIPO hObj)	{ SetStruct(hObj); }
 
	EditorPO			*GetPhysicalObject	  (void)					{ return m_p_oPhysicalObject; }
	void				SetPhysicalObject	  (EditorPO *p_oPO)			{ m_p_oPhysicalObject = p_oPO; }
 
/*	CPA_SectionObject	*GetSectionRLI		  (void)					{ return m_pSectionRLI; }*/
	CString				GetRLISectionName	  (void);
 
	BOOL				fn_bCanSaveRLI		  (void);
 
	/*==> Base Object overlapped*/
    long				GetDataType			  (void)					{ return m_ulType; }
    void				*GetData		  	  (void)					{ return GetStruct(); }
 
	/*==> Save Object overlapped*/
	void				fn_vNotifySave		  (void);
	void				fn_vNotifyUnSave	  (void);
	void				fn_vNotifyRestore	  (void);
	void				fn_vNotifyRename	  (void);
	void				fn_vUpdateSectionName (void);
 
	/* ==> Script callbacks */
	static void			CallBackSaveIPO	
							(
								SCR_tdst_File_Description *p_stFile, 
								char *p_szSectionName, 
								void *p_vData, 
								SCR_tde_Ntfy_Action eAction
							);
 
/*	static void			CallBackSaveRLI					
							(
								SCR_tdst_File_Description *p_stFile, 
								char *p_szSectionName, 
								void *p_vData, 
								SCR_tde_Ntfy_Action eAction
							);*/
};
 
#endif /*__EDIT_IPO_HPP__*/
