titlefile.h

来自「基于SAA7113的MPEG-4程序」· C头文件 代码 · 共 67 行

H
67
字号
// TitleFile.h: interface for the CTitleFile class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_TITLEFILE_H__BE7FB29C_5CA9_477C_8F42_43A2B3BBE624__INCLUDED_)
#define AFX_TITLEFILE_H__BE7FB29C_5CA9_477C_8F42_43A2B3BBE624__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "inifile.h"

/*

[KEY1]
ValueName11 = Value11
ValueName12 = Value12

[KEY2]
ValueName21 = Value21
ValueName22 = Value22

*/

class CTitleFile  
{

public:
	static CTitleFile* getInstance();
	static void releaseInstance();

private:
	virtual ~CTitleFile();
	CTitleFile();

	static CTitleFile* m_pInstance;

public:

	void InitFile(CString strFile);

	//设置某一个KEY下的ValueName和Value
	void SetValue(CString strKey,CString strName,CString strValue);

	//获得某KEY下的某ValueName的Value
	void GetValue(CString strKey,CString strName,CString& strValue);

	//删除某一个KEY下的ValueName
	void DelValue(CString strKey,CString strName);

	//删除所有的KEY及其ValueName
	void DelAllKeys();

	//获得所有KEY
	void GetAllKeys(CStringList& strKeyList);

	//获得某KEY下的所有ValueName
	void GetAllNamesInKey(CString strKey,CStringList& strNameList);

private:
	CString m_strFileName;

};

#endif // !defined(AFX_TITLEFILE_H__BE7FB29C_5CA9_477C_8F42_43A2B3BBE624__INCLUDED_)

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?