atsfile.h

来自「AtScript 1.1 一个很好用的脚本引擎,可以很方便的在你的软件中实现脚本」· C头文件 代码 · 共 47 行

H
47
字号
// AtsFile.h: interface for the CAtsFile class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_ATSFILE_H__F37AEEC4_7814_449E_8233_3837229F002F__INCLUDED_)
#define AFX_ATSFILE_H__F37AEEC4_7814_449E_8233_3837229F002F__INCLUDED_

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

#include "AtsDef.h"
#include "MyMemFile.h"
#include "AtsSegmentItem.h"

class ATS_API CAtsFile  
{
public:
	CAtsFile();
	virtual ~CAtsFile();

	static BOOL IsVar( CAtsString strLine , CAtsString &strVarName , int &nVarType );
	BOOL IsRem(CAtsString strLine);
	BOOL ReadFromFile( CAtsString strFileName , CAtsString &strData  );
	BOOL ReadLineFromFile( CAtsString &strData , BOOL &bIsEend );
	BOOL OpenFile( CAtsString strFileName );
	void LoadScript( CAtsString strScript );
	void CloseFile();
	BOOL IsEndFile();
	CAtsSegmentItem * GetSegment( CAtsString strLine );
	BOOL IsSegment( CAtsString strLine , CAtsString &strSegmentData , int &nSegmentType );
	BOOL IsSegmentEnd( CAtsString strLine , int &nSegmentType );
	BOOL GetDataLine(CAtsString &strLine , bool bCancelEmpLine  );
	static void GetLastWord( CAtsString strLine, CAtsString &strLastWord, CAtsString &strOtherData );
	static void GetFistWord( CAtsString strLine, CAtsString &strFistWord, CAtsString &strOtherData );
	static BOOL GetElementItem(CAtsString &strStuff, CAtsString &strItem,CAtsString strApart);

	CMyMemFile		m_MemFile;
	CFile			m_IOFile;
	BOOL			m_bUserMemFile;
	BOOL			m_bEndFile;
	CAtsString		m_strCurSegment;
	int				m_nCurLinePos;
};

#endif // !defined(AFX_ATSFILE_H__F37AEEC4_7814_449E_8233_3837229F002F__INCLUDED_)

⌨️ 快捷键说明

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