📄 mldirectxerror.cpp
字号:
///////////////////////////////////////////////////////////////////////////////
//
// File: mlDirectXError.cpp
//
// Author: Frank Luna (C) All Rights Reserved
//
// System: Athlon 1800+ XP, 512 DDR, Radeon 9500 Pro, Windows XP, MSVC++ 7.0
//
// Desc: Contains the implementation of DirectXError.
//
///////////////////////////////////////////////////////////////////////////////
#include "mlDirectXError.h"
using namespace dx_err;
DirectXError::DirectXError()
{
_hrCode = "null";
_filename = "null";
_lineNum = "null";
}
DirectXError::DirectXError(HRESULT& hrCode, cstring& filename, uint32& lineNum)
{
char buff1[32];
::itoa(hrCode, buff1, 10);
char buff2[32];
::itoa(lineNum, buff2, 10);
_hrCode = buff1;
_filename = filename;
_lineNum = buff2;
}
cstring& DirectXError::getHRCode()
{
return _hrCode;
}
cstring& DirectXError::getFilename()
{
return _filename;
}
cstring& DirectXError::getLineNum()
{
return _lineNum;
}
std::string DirectXError::getFullError()
{
std::string s1 = "HRESULT Value: " + _hrCode + "\n";
std::string s2 = "Filename : " + _filename + "\n";
std::string s3 = "Line number: " + _lineNum;
std::string msg = s1 + s2 + s3;
return msg;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -