⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 resexception.h

📁 这个是我第一次完成的一个简单的3D ALIEN SHOOTING GAME的RESOURCE MANAGER部分,大家可以看看,然后提点意见~THX
💻 H
字号:
// ResException.h
//

// Author:			Lea Hayes
// Date Created:	26/03/2006
// Date Modified:	26/03/2006

#pragma once


namespace Resources
{


class ResException
{
// Construction and destruction.
public:
	ResException(const ResException& src);
	ResException(LPCSTR lpszException,
		LPCSTR lpszSrcFile = NULL, DWORD dwLineNo = NULL);
	virtual ~ResException();


// Default exceptions.
	static const ResException Unknown;
	static const ResException UnableToOpenFile;
	static const ResException UnableToCreate;


// Function operator overload.
	ResException operator() (LPCSTR lpszSrcFile, DWORD dwLineNo) const;


// Properties.
	void SetException(LPCSTR lpszException);
	void SetExtraInfo(LPCSTR lpszExtraInfo);
	void SetSourceFile(LPCSTR lpszSrcFile, DWORD dwLineNo);

	inline LPCSTR GetText() const
	{
		return m_szException;
	}
	inline LPCSTR GetExtraInfo() const
	{
		return m_szExtraInfo;
	}
	inline LPCSTR GetSourceFile() const
	{
		return m_szSrcFile;
	}
	inline DWORD GetLineNumber() const
	{
		return m_dwLineNo;
	}

	std::string ToString() const;


// Operator overloads.
	bool operator== (const ResException& src) const;


// Helper functions.
protected:
	void SetString(LPSTR* lpszOut, LPCSTR lpszIn);


// Attributes.
private:
	LPSTR m_szException;
	LPSTR m_szExtraInfo;
	LPSTR m_szSrcFile;
	DWORD m_dwLineNo;
};


#define EXTRA_DEBUGINFO				(__FUNCTION__, __LINE__)


}; // namespace Resources

⌨️ 快捷键说明

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