本文整理匯總了C++中AddLog函數的典型用法代碼示例。如果您正苦於以下問題:C++ AddLog函數的具體用法?C++ AddLog怎麽用?C++ AddLog使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了AddLog函數的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: AddLog
// returns the number of free clusters in 'count' }
BYTE Cmd100::ExecGetFree(BYTE x) {
AddLog(LOG_PRINTER,tr("MD-100 Function: ExecGetFree(%1)").arg(x,2,16,QChar('0')));
index++;
count = fdd.GetFreeDiskSpace();
return opstatus;
}
示例2: AddLog
void Cprinter::raise()
{
paperWidget->updated = true;
AddLog(LOG_TEMP,"RAISE");
CPObject::raise();
}
示例3: Get_Connector
bool Cpc2021::run(void)
{
Get_Connector();
#if 1
// Try to introduce a latency
quint64 deltastate = 0;
if (run_oldstate == -1) run_oldstate = pTIMER->state;
deltastate = pTIMER->state - run_oldstate;
if (deltastate < PC2021LATENCY ) return true;
run_oldstate = pTIMER->state;
#endif
quint8 c = pCONNECTOR->Get_values();
if (c>0)
{
AddLog(LOG_PRINTER,QString("Recieve:%1 = (%2)").arg(c,2,16,QChar('0')).arg(QChar(c)));
SET_PIN(9,1);
Printer(c);
}
pCONNECTOR_value = pCONNECTOR->Get_values();
Set_Connector();
return true;
}
示例4: UserCmd_DropTag
bool UserCmd_DropTag(uint iClientID, const wstring &wscCmd, const wstring &wscParam, const wchar_t *usage)
{
if (set_bCharnameTags)
{
// Indicate an error if the command does not appear to be formatted correctly
// and stop processing but tell FLHook that we processed the command.
if (wscParam.size()==0)
{
PrintUserCmdText(iClientID, L"ERR Invalid parameters");
PrintUserCmdText(iClientID, usage);
return true;
}
wstring wscCharname = (const wchar_t*)Players.GetActiveCharacterName(iClientID);
wstring tag = GetParam(wscParam, ' ', 0);
wstring pass = GetParam(wscParam, ' ', 1);
// If this tag is in use then reject the request.
for (std::map<wstring, TAG_DATA>::iterator i = mapTagToPassword.begin(); i != mapTagToPassword.end(); ++i)
{
if (tag == i->second.tag && pass == i->second.master_password)
{
mapTagToPassword.erase(tag);
SaveSettings();
PrintUserCmdText(iClientID, L"OK Tag dropped");
AddLog("NOTICE: Tag %s dropped by %s (%s)", wstos(tag).c_str(), wstos(wscCharname).c_str(), wstos(HkGetAccountIDByClientID(iClientID)).c_str());
return true;
}
}
PrintUserCmdText(iClientID, L"ERR tag or master password are invalid");
return true;
}
return false;
}
示例5: AddLog
HRESULT CDebug::AddText3D( int _no, D3DXVECTOR3 _pos, LPTSTR _str, bool _isUpdate)
{
HFONT hFontOld;
hFontOld = (HFONT)SelectObject(m_hdc, m_hFont);
if( _no >= LOG_COUNT || _no < 0 )
{
//로그 최대 갯수안에 들어오지 않거나 0보다 작으면 반환;
/*if( m_Text3dCount >= LOG_COUNT )
m_Text3dCount = 0;
_no = m_Text3dCount ;*/
AddLog(-1, _T("3D문자열 추가 실패 : %s"), _str);
return E_FAIL;
}
m_Text3dPos[_no] = _pos;
if( _no >= m_Text3dCount || _isUpdate )
{
if (D3DXCreateText( m_pDevice,
m_hdc,
_str,
0.5f,
0.4f,
&m_Text3D[_no++],
NULL,
NULL) != D3D_OK)
assert(false);
m_Text3dCount = _no;
}
SelectObject(m_hdc, hFontOld);
return S_OK;
}
示例6: LogCheater
void LogCheater(uint client, const wstring &reason)
{
CAccount *acc = Players.FindAccountFromClientID(client);
if (!HkIsValidClientID(client) || !acc)
{
AddLog("ERROR: invalid parameter in log cheater, clientid=%u acc=%08x reason=%s", client, acc, wstos(reason).c_str());
return;
}
//internal log
string scText = wstos(reason);
Logging("%s", scText.c_str());
// Set the kick timer to kick this player. We do this to break potential
// stack corruption.
HkDelayedKick(client, 1);
// Ban the account.
flstr *flStr = CreateWString(acc->wszAccID);
Players.BanAccount(*flStr, true);
FreeWString(flStr);
// Overwrite the ban file so that it contains the ban reason
wstring wscDir;
HkGetAccountDirName(acc, wscDir);
string scBanPath = scAcctPath + wstos(wscDir) + "\\banned";
FILE *file = fopen(scBanPath.c_str(), "wb");
if (file)
{
fprintf(file, "Autobanned by Marketfucker\n");
fclose(file);
}
}
示例7: MemMirror
bool Ce500::Chk_Adr(DWORD *d,DWORD data)
{
#if (TEST_MEMORY_MAPPING)
quint32 tmp = *d;
MemMirror(d);
if ( (tmp>=0x40000) && (tmp<=0xBFFFF) && (pCPU->fp_log)) fprintf(pCPU->fp_log,"\nRAM WRITE: [%06X] -> [%06X]=%02X\n",tmp,*d,data);
#endif
if ( (*d>=0x00000) && (*d<=0x3FFFF)) {
// if((*d&0x3000)==0x1000){
// *d&=0x103f; pRP5C01->write(*d&31,data);
// return((*d&0x10)==0); /* CLOCK (010xx) */
// }
if((*d&0x6000)==0x2000){
*d&=0x200f; disp(*d&15,data);//lcdc.access=1; lcdc.lcdcadr=*d&15;
return(1-(*d&1)); /* LCDC (0200x) */
}
return 1;
}
#if (TEST_MEMORY_MAPPING)
if ( (*d>=0x40000) && (*d<=0x4FFFF)) return (ext_MemSlot1->ExtArray[ID_CE210M]->IsChecked ||
ext_MemSlot1->ExtArray[ID_CE211M]->IsChecked ||
ext_MemSlot1->ExtArray[ID_CE212M]->IsChecked ||
ext_MemSlot1->ExtArray[ID_CE2H16M]->IsChecked ||
ext_MemSlot1->ExtArray[ID_CE2H32M]->IsChecked ||
ext_MemSlot1->ExtArray[ID_CE2H64M]->IsChecked);
if ( (*d>=0x80000) && (*d<=0xB7FFF)) {
AddLog(LOG_RAM,QString("adr;%1").arg(*d,6,16,QChar('0')));
}
if ( (*d>=0xB8000) && (*d<=0xBFFFF)) return 1;
#endif
if ( (*d>=0x40000) && (*d<=0xBFFFF)) return 1;
if ( (*d>=0xC0000) && (*d<=0xFFFFF)) return 0;
// if(*d>0xbffff) return(0); /* ROM area(c0000-fffff) S3: */
// if(*d>0x7ffff) return(1); /* RAM area(80000-bffff) S1: */
// if(*d>0x3ffff) return(1); /* RAM area(40000-7ffff) S2: */
#if 0
if(*d>0x1ffff){
// if(sc.e6) return(0); /* ROM area(20000-3ffff) ->E650/U6000 */
// else{
// *d=BASE_128[GetBank()]+(*d&0x1ffff);
// return(1-(sc.emsmode>>4)); /* RAM area(20000-3ffff) EMS */
// }
}
if(*d>0x0ffff){
*d=BASE_64[GetBank()]+(*d&0xffff);
return(1-(sc.emsmode>>4)); /* RAM area(10000-1ffff) EMS */
}
示例8: if
bool KEYBMAPParser::startElement( const QString&, const QString&, const QString &name, const QXmlAttributes &attrs )
{
QString desc = "";
QString modifier="";
int scancode,masterscancode,delay,x,y,w,h;
View view=FRONTview;
bool ok = false;
scancode=masterscancode=delay=x=y=w=h=0;
if( inKeyboard && name == "KEY" )
{
for( int i=0; i<attrs.count(); i++ )
{
if( attrs.localName( i ) == "description" )
desc = attrs.value( i );
else if( attrs.localName( i ) == "scancode" )
scancode = attrs.value( i ).toInt(&ok,16);
else if( attrs.localName( i ) == "left" )
x = attrs.value( i ).toInt(&ok,10);
else if( attrs.localName( i ) == "top" )
y = attrs.value( i ).toInt(&ok,10);
else if( attrs.localName( i ) == "width" )
w = attrs.value( i ).toInt(&ok,10);
else if( attrs.localName( i ) == "height" )
h = attrs.value( i ).toInt(&ok,10);
else if( attrs.localName( i ) == "masterscancode" )
masterscancode = attrs.value( i ).toInt(&ok,16);
else if( attrs.localName( i ) == "delay" ) {
delay = attrs.value( i ).toInt(&ok,10);
qWarning()<<"delay="<<delay;
}
else if( attrs.localName( i ) == "modifier" )
modifier = attrs.value( i );
else if( attrs.localName( i ) == "view" ) {
if (attrs.value( i ) == "FRONT") view = FRONTview;
if (attrs.value( i ) == "TOP") view = TOPview;
if (attrs.value( i ) == "LEFT") view = LEFTview;
if (attrs.value( i ) == "RIGHT") view = RIGHTview;
if (attrs.value( i ) == "BACK") view = BACKview;
if (attrs.value( i ) == "BOTTOM") view = BOTTOMview;
}
}
Parent->Keys.append(CKey(scancode,desc,QRect(x,y,w,h),masterscancode,modifier,view,delay));
AddLog(LOG_KEYBOARD,mainwindow->tr("XML Read key : %1, scan=0x%2 , Rect=(%3,%4,%5,%6), mscan=0x%7, mod=%8").
arg(desc).
arg(scancode,2,16,QChar('0')).
arg(x).arg(y).arg(w).arg(h).
arg(masterscancode,2,16,QChar('0')).
arg(modifier));
}
else if( name == "Keyboard" )
inKeyboard = true;
return true;
}
示例9: AddLog
bool Crlp9001::LoadSession_File(QXmlStreamReader *xmlIn)
{
if (xmlIn->name()=="session") {
bool rot = xmlIn->attributes().value("rotate").toString().toInt(0,16);
if (rotate != rot) Rotate();
if (xmlIn->readNextStartElement() && xmlIn->name() == "memory" ) {
AddLog(LOG_MASTER,"Load Memory");
for (int s=0; s<SlotList.size(); s++) // Save Memory
{
if (SlotList[s].getType() == RAM) {
AddLog(LOG_MASTER," Load Slot"+SlotList[s].getLabel());
Mem_Load(xmlIn,s);
}
}
}
}
return true;
}
示例10: AddLog
void CHD61102::cmd_setX(qint16 cmd)
{
BYTE newXadr = cmd & 0x07;
if (newXadr != info.Xadr) {
info.Xadr = newXadr;
updated = true;
AddLog(LOG_DISPLAY,tr("UPDATED setX"));
}
}
示例11: SHVVA_START
void SHVTestResult::AddLog(const SHVTChar* s, ...)
{
SHVString str;
SHVVA_LIST args;
SHVVA_START(args, s);
str.FormatList(s,args);
AddLog(str);
SHVVA_END(args);
}
示例12: SSModule_StartSaving
SSMODULEDECLSPEC int SSMODULECALL SSModule_StartSaving(HWND hwndParent, char *pchHomeDirectory, int bPreviewMode)
{
// This is called when we should start the saving.
// Return error if already running, start the saver thread otherwise!
if (bRunning)
return SSMODULE_ERROR_ALREADYRUNNING;
readConfig(pchHomeDirectory);
iSaverThreadState = STATE_UNKNOWN;
bOnlyPreviewMode = bPreviewMode;
tidSaverThread = _beginthread(fnSaverThread,
0,
1024*1024,
(void *) hwndParent);
if (tidSaverThread == 0)
{
#ifdef DEBUG_LOGGING
AddLog("[SSModule_StartSaving] : Error creating screensaver thread!\n");
#endif
// Error creating screensaver thread!
return SSMODULE_ERROR_INTERNALERROR;
}
// Wait for saver thread to start up!
while (iSaverThreadState==STATE_UNKNOWN) DosSleep(32);
if (iSaverThreadState!=STATE_RUNNING)
{
#ifdef DEBUG_LOGGING
AddLog("[SSModule_StartSaving] : Something went wrong in screensaver thread!\n");
#endif
// Something wrong in saver thread!
DosWaitThread(&tidSaverThread, DCWW_WAIT);
return SSMODULE_ERROR_INTERNALERROR;
}
// Fine, screen saver started and running!
bRunning = TRUE;
return SSMODULE_NOERROR;
}
示例13: AddLog
bool Ckeyb::CheckKon()
{
Kon = FALSE;
if ( (LastKey == K_BRK) )
{
Kon = TRUE;
AddLog(2,"Kon TRUE");
LastKey = 0;
}
return (Kon);
}
示例14: AddLog
bool Ccemem::LoadSession_File(QXmlStreamReader *xmlIn)
{
if (xmlIn->name()=="session") {
if (xmlIn->readNextStartElement() && xmlIn->name() == "memory" ) {
AddLog(LOG_MASTER,"Load Memory");
for (int s=0; s<SlotList.size(); s++) // Save Memory
{
switch (SlotList[s].getType()) {
case CSlot::RAM:
case CSlot::CUSTOM_ROM:
AddLog(LOG_MASTER," Load Slot"+SlotList[s].getLabel());
Mem_Load(xmlIn,s); break;
default: break;
}
}
}
}
return true;
}