#ifndef __MSG4180_H__
#define __MSG4180_H__

/* THIS FILE is created by SYMPHONY II Code Generator */
/* DO NOT EDIT this file manually                     */

#include "cdate.h"
#include "cstring.h"

#include "msgbase.h"
#include "M_FiSales.h"
#include "M_FiCpnSchedule.h"
#include "M_FiSimpleCpn.h"
#include "M_FiCompoundCpn.h"
#include "M_FiFixedCpn.h"
#include "M_FiCpnSchedule.h"


// CMsg4180
class V2_DLL_API M_FiFixedGrace : public CMsgBase
{
public:
	CDate nGraceEndDate;
	CString sGracePayTmPt;
	CString sGraceCpnType;
	M_FiSales mFiSales;
	M_FiCpnSchedule_Array maFiCpnSchedule;
	M_FiSimpleCpn mFiSimpleCpn;
	M_FiCompoundCpn mFiCompoundCpn;
	M_FiFixedCpn mFiFixedCpn;
	M_FiCpnSchedule mFiCpnSchedule2;


public:
	M_FiFixedGrace();
	int Load(CMsg *p_pMsg);
	CMsg *ToMsg();
	void Copy(M_FiFixedGrace &p_Obj);
	void Dump(CStream *p_pBuffer) const;
};


class V2_DLL_API M_FiFixedGrace_Array : public CMsgBase_Array
{
private:
	int m_iBufSize;
	int m_iSize;
	M_FiFixedGrace **m_pArr;

public:
	M_FiFixedGrace_Array() : m_iBufSize(0), m_iSize(0), m_pArr(NULL) {}
	M_FiFixedGrace_Array(int p_iSize) { m_pArr = NULL; SetSize(p_iSize); }
	~M_FiFixedGrace_Array() { RemoveAll(); }

	void RemoveAll();
	int Load(CMsgArray *p_pMsgArr);
	CMsg *ToMsg(int p_idx);
	int SetSize(int p_iSize);
	int Grow();
	int GetSize() const { return m_iSize; }
	M_FiFixedGrace *GetAt(int p_idx) const;
	M_FiFixedGrace &operator[](int p_idx) const;
	void Copy(M_FiFixedGrace_Array &p_ArrObj);
	void Dump(CStream *p_pBuffer) const;
};

#endif	// __MSG4180_H__

