reman3/Rayman_X/cpa/public/ITF/CPASectO.hpp

91 lines
2.9 KiB
C++

/*=========================================================================
*
* CPASectO.hpp - CPA_SectionObject : definition
*
*
* Version 1.0
* Creation date 20.06.97
* Revision date
*
* Shaitan
*=======================================================================*/
#ifdef ACTIVE_EDITOR
#ifndef __SECTION_OBJECT_HPP__
#define __SECTION_OBJECT_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
/****************************************/
#include "SCR.h"
/*#################################################################################*/
/* CPA_SectionObject*/
/*#################################################################################*/
class CPA_EXPORT CPA_SectionObject
{
private:
/* section*/
CString m_csReferencedSectionName;
CString m_csInitialReferencedSectionName;
char *m_p_szDataPath;
/* parameters for save*/
SCR_tdpfn_Ntfy_Callback m_p_fnCallBackSave;
SCR_tde_Ntfy_Action m_eCurrentNotify;
SCR_tde_Ntfy_Action m_eLastNotify;
BOOL m_bExistingSection;
void * m_pSectionData;
public:
CPA_SectionObject (const CString csReferencedSectionName, char *p_szDataPath, SCR_tdpfn_Ntfy_Callback pCallBack,
void *pSectionData = NULL, BOOL bExistingSection = TRUE);
CPA_SectionObject (CPA_SectionObject &r_oSource);
~CPA_SectionObject (void);
/* access*/
SCR_tde_Ntfy_Action GetCurrentNotification (void) { return m_eCurrentNotify; }
CString GetInitialSectionName (void) { return m_csInitialReferencedSectionName; }
void * GetSectionData (void) { return m_pSectionData; }
char * GetDataPath (void) { return m_p_szDataPath; }
BOOL fn_bSectionExists (void) { return m_bExistingSection; }
CString GetCompleteSectionName (void);
CString GetReferencedSectionName (void);
/* set functions*/
void SetReferencedSectionName (const CString csNewSectionName) { m_csReferencedSectionName = csNewSectionName; }
void SetSectionData (void *pSectionData) { m_pSectionData = pSectionData; }
void SetExistingSection (BOOL bSectionExists) { m_bExistingSection = bSectionExists; }
void SetCallBackSave (SCR_tdpfn_Ntfy_Callback pCallBack) { m_p_fnCallBackSave = pCallBack; }
void SetDataPath (char *p_szDataPath) { m_p_szDataPath = p_szDataPath; }
/* notifications*/
void fn_vWriteSection (void);
void fn_vDeleteSection (void);
void fn_vRestoreSection (void);
void fn_vRenameSection (const CString csNewReferencedSectionName);
void fn_vNotifySection (SCR_tde_Ntfy_Action eAction);
/* inits*/
void fn_vSectionSaved (void);
void fn_vSectionDeleted (void);
};
#endif /* __SECTION_OBJECT_HPP__*/
#endif /* ACTIVE_EDITOR*/