1)模板类的继承和构造函数:
template< class T >
class CFileINI
{
public:
CFileINI()
{
m_strFileName = CCommonFun::GetCurAppPath() + "\\" + STR_SEVER_DEFAULT_DIR;
};
CFileINI( CString strPathFileName ) : m_strFileName( strPathFileName )
{};
virtual ~CFileINI();
BOOL WriteINI( T oINI );
T ReadINI();
protected:
CString m_strFileName;
};
class CFileINI_Server : public CFileINI< ST_SERVER_INI >
{
public:
CFileINI_Server( CString strPathFileName ) : CFileINI< ST_SERVER_INI > ( strPathFileName )
{};
};
阅读(1434) | 评论(0) | 转发(0) |