/* Definitions for the classes to handle lists of Owner Data*/
/**/
/* YB*/
/*/////////////////////////////////////////////////////////////*/
#ifndef _CTL_OWNER_DATA_
#define _CTL_OWNER_DATA_
 
#if _MSC_VER >= 1000
#pragma once
#endif /* _MSC_VER >= 1000*/
 
#include <afxtempl.h>
#include "ACP_Base.h"
 
/*#############################################################*/
typedef enum CTL_eOwnerData_Type
{
	CTL_OWNER_DATA_TYPE_POINTER = 0,
	CTL_OWNER_DATA_TYPE_LONG,
 
} CTL_tdeOwnerData_Type;
 
/*#############################################################*/
class CPA_EXPORT CTL_OwnerData
{
public:
	/*Constructors*/
	CTL_OwnerData(void *_pvDataPtr,
								CString _csName);
	CTL_OwnerData(long _lData,
								CString _csName);
	/*Destructor*/
	~CTL_OwnerData();
 
/*Attributes*/
public:
 
protected:
 
private:
	CString m_pri_csName;
	void *m_pri_pvDataPtr;
	long m_pri_lData;
 
	CTL_tdeOwnerData_Type m_pri_tdeType;
 
/*Functiosn*/
public:
	CString m_pub_fn_csGetName();
 
	/*Data Pointer*/
	void *m_pub_fn_pvGetDataPtr();
	void m_pub_fn_vSetDataPtr(void *_pvDataPtr);
 
	/*Data*/
	long m_pub_fn_lGetData();
	void m_pub_fn_vSetData(long _lData);
 
protected:
 
private:
 
};
 
/*#############################################################*/
class CPA_EXPORT CTL_ListOfOwnerData : public CList<CTL_OwnerData *, CTL_OwnerData *>
{
public:
	CTL_ListOfOwnerData();
	~CTL_ListOfOwnerData();
 
/*Attributes*/
public:
 
protected:
 
private:
 
/*Functiosn*/
public:
	void m_pub_fn_vAddOwnerData(CTL_OwnerData *_pclNewOwnerData);
	CTL_OwnerData *m_pub_fn_pclAddOwnerData(void *_pvDataPtr,
																					CString _csName);
	CTL_OwnerData *m_pub_fn_pclAddOwnerData(long _lData,
																					CString _csName);
 
	void m_pub_fn_vEmptyListAndDestroyElements();
	void m_pub_fn_vEmptyListWithoutDestroyingElements();
 
	CTL_OwnerData *m_pub_fn_pclFindOwnerDataWithName(CString _csSearchedName);
 
protected:
 
private:
 
};
 
#endif /*_CTL_OWNER_DATA_*/
