当前位置: 首页>>代码示例>>C++>>正文


C++ AddLog函数代码示例

本文整理汇总了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;
}
开发者ID:pockemul,项目名称:PockEmul,代码行数:8,代码来源:md100.cpp

示例2: AddLog

void Cprinter::raise()
{
    paperWidget->updated = true;
    AddLog(LOG_TEMP,"RAISE");
    CPObject::raise();

}
开发者ID:TheProjecter,项目名称:pockemul,代码行数:7,代码来源:cprinter.cpp

示例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;
}
开发者ID:TheProjecter,项目名称:pockemul,代码行数:33,代码来源:pc2021.cpp

示例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;
	}
开发者ID:HeIIoween,项目名称:FLHook,代码行数:35,代码来源:Rename.cpp

示例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;
}
开发者ID:qiomoip,项目名称:space-express,代码行数:32,代码来源:Debug.cpp

示例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);
		}
}
开发者ID:HeIIoween,项目名称:FLHook,代码行数:34,代码来源:Main.cpp

示例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 */
    }
开发者ID:TheProjecter,项目名称:pockemul,代码行数:59,代码来源:e500.cpp

示例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;
}
开发者ID:pockemul,项目名称:PockEmul,代码行数:57,代码来源:Keyb.cpp

示例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;
}
开发者ID:TheProjecter,项目名称:pockemul,代码行数:18,代码来源:rlp9001.cpp

示例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"));
    }
}
开发者ID:TheProjecter,项目名称:pockemul,代码行数:9,代码来源:hd61102.cpp

示例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);
}
开发者ID:ElmerFuddDK,项目名称:libshiva,代码行数:10,代码来源:shvtestserver.cpp

示例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;
}
开发者ID:OS2World,项目名称:UTIL-WPS-Doodle-Screen-Saver,代码行数:43,代码来源:Text.c

示例13: AddLog

bool Ckeyb::CheckKon()
{
	Kon = FALSE;
	if ( (LastKey == K_BRK) )
	{
		Kon = TRUE;
		AddLog(2,"Kon TRUE");
		LastKey = 0;
    }
	return (Kon);
}	
开发者ID:TheProjecter,项目名称:pockemul,代码行数:11,代码来源:Keyb.cpp

示例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;
}
开发者ID:pockemul,项目名称:PockEmul,代码行数:20,代码来源:cemem.cpp


注:本文中的AddLog函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。