• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ PrintLog函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中PrintLog函数的典型用法代码示例。如果您正苦于以下问题:C++ PrintLog函数的具体用法?C++ PrintLog怎么用?C++ PrintLog使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了PrintLog函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: InitDisc

// Called by DeviceOpen(), DeviceGetDiskType()
void InitDisc()
{
	int i;
#ifdef VERBOSE_FUNCTION_DEVICE
	PrintLog("CDVD device: InitDisc()");
#endif /* VERBOSE_FUNCTION_DEVICE */
	if ((disctype == CDVD_TYPE_PS2DVD) ||
	    (disctype == CDVD_TYPE_DVDV))
		InitDVDInfo(); // ENDIF- Clean out DVD Disc Info?
	if ((disctype == CDVD_TYPE_PS2CD) ||
	    (disctype == CDVD_TYPE_PS2CDDA) ||
	    (disctype == CDVD_TYPE_PSCD) ||
	    (disctype == CDVD_TYPE_PSCDDA) ||
	    (disctype == CDVD_TYPE_CDDA))
		InitCDInfo(); // ENDIF- Clean out DVD Disc Info?
	disctype = CDVD_TYPE_NODISC;
	for (i = 0; i > sizeof(tocbuffer); i++)  tocbuffer[i] = 0x00;
} // END InitDisc()
开发者ID:Codyle,项目名称:pcsx2,代码行数:19,代码来源:device.c


示例2: ReadBotGenInfo

static int ReadBotGenInfo (CFile& cf)
{
if (gameFileInfo.botGen.offset > -1) {
	int		i, j;
	CSegment	*segP;

	if (cf.Seek (gameFileInfo.botGen.offset, SEEK_SET)) {
		Error ("Error seeking to robot generator data\n(file damaged or invalid)");
		return -1;
		}
	for (i = 0; i < gameFileInfo.botGen.count; i++) {
		if (gameTopFileInfo.fileinfoVersion < 27) {
			old_tMatCenInfo m;

			OldMatCenInfoRead (&m, cf);

			gameData.matCens.botGens [i].objFlags [0] = m.objFlags;
			gameData.matCens.botGens [i].objFlags [1] = 0;
			gameData.matCens.botGens [i].xHitPoints = m.xHitPoints;
			gameData.matCens.botGens [i].xInterval = m.xInterval;
			gameData.matCens.botGens [i].nSegment = m.nSegment;
			gameData.matCens.botGens [i].nFuelCen = m.nFuelCen;
		}
		else
			MatCenInfoRead (gameData.matCens.botGens + i, cf);

		//	Set links in gameData.matCens.botGens to gameData.matCens.fuelCenters array
		for (j = gameData.segs.nSegments, segP = SEGMENTS.Buffer (); j; j--, segP++)
			if ((segP->m_nType == SEGMENT_IS_ROBOTMAKER) && (segP->m_nMatCen == i)) {
				gameData.matCens.botGens [i].nFuelCen = segP->m_value;
				break;
				}
		if (!j) {
#if DBG
			PrintLog ("Invalid robot generator data found\n");
#endif
			gameData.matCens.nBotCenters--;
			gameFileInfo.botGen.count--;
			i--;
			}
		}
	}
return 0;
}
开发者ID:paud,项目名称:d2x-xl,代码行数:44,代码来源:gamesave.cpp


示例3: GetUniformLocation

 /*************************************************************//**
 *
 *  @brief  float型の3つの値でユニフォーム変数を設定する
 *  @param  ユニフォーム変数の名前
 *  @param  値1
 *  @param  値2
 *  @param  値3
 *  @return 正常終了:true
 *  @return 異常終了:false
 *
 ****************************************************************/
bool C_BaseShader::SetUniform3f(const std::string& rName, 
                                float x,
                                float y,
                                float z)
{
    // ユニフォーム変数の場所を取得
    int32_t location = GetUniformLocation(rName);

    if (location == s_UNIFORM_LOCATION_ERROR_VELUE)
    {
        PrintLog("[ C_BaseShader::SetUniform3f ] : ユニフォーム変数の場所の取得に失敗しました。\n");

        return false;
    }

    glUniform3f(location, x, y, z);

    return true;
}
开发者ID:risaki-masa,项目名称:OpenGL_Framework,代码行数:30,代码来源:BaseShader.cpp


示例4: exec

QVector<PrintLog> SqlHelper::getPrintLogByUserName(QString userName) {
    QString sql = "select id, status, user_name, printer_name, file_path, title, options, copies, submit_time, print_time from tab_print_log where user_name = '" + userName + "';";
    QVector<PrintLog> res;
    QVector<QVector<QVariant> > table = exec(sql, 10);
    for (auto i : table) {
        int id = i[0].toInt();
        int status = i[1].toInt();
        QString userName = i[2].toString();
        QString printerName = i[3].toString();
        QString filePath = i[4].toString();
        QString title = i[5].toString();
        QString options = i[6].toString();
        int copies  = i[7].toInt();
        QDateTime submitTime = i[8].toDateTime();
        QDateTime printTime = i[9].toDateTime();
        res.push_back(PrintLog(id, status, userName, printerName, filePath, title, options, copies, submitTime, printTime));
    }
    return res;
}
开发者ID:caiweiwenjs,项目名称:cprinter,代码行数:19,代码来源:sqlhelper.cpp


示例5: LoadTextureColors

void LoadTextureColors (const char *pszLevelName, tFaceColor *colorP)
{
	char			szFilename [SHORT_FILENAME_LEN];
	CFile			cf;
	int			i;

//first, free up data allocated for old bitmaps
PrintLog ("   loading texture colors\n");
CFile::ChangeFilenameExtension (szFilename, pszLevelName, ".clr");
if (cf.Open (szFilename, gameFolders.szDataDir, "rb", 0)) {
	if (!colorP)
		colorP = gameData.render.color.textures.Buffer ();
	for (i = MAX_WALL_TEXTURES; i; i--, colorP++) {
		ReadColor (cf, colorP, 0, 0);
		colorP->index = 0;
		}
	cf.Close ();
	}
}
开发者ID:paud,项目名称:d2x-xl,代码行数:19,代码来源:loadtextures.cpp


示例6: HashUUIDForAPR

unsigned int HashUUIDForAPR (const char *key_s, apr_ssize_t *len_p)
{
	unsigned int res = 0;
	char *uuid_s = GetUUIDAsString ((const uint8 *) key_s);

	if (uuid_s)
		{
			apr_ssize_t len = APR_HASH_KEY_STRING;
			res = apr_hashfunc_default (uuid_s, &len);

			#if APR_GLOBAL_STORAGE_DEBUG >= STM_LEVEL_FINER
			PrintLog (STM_LEVEL_FINER, __FILE__, __LINE__, "uuid \"%s\" res %u len %u", uuid_s, res, len);
			#endif

			FreeCopiedString (uuid_s);
		}

	return res;
}
开发者ID:TGAC,项目名称:grassroots-api,代码行数:19,代码来源:apr_global_storage.c


示例7: PrintLog

Smt_Uint TASTConnector::Ami_Originate(Smt_Uint handle, Smt_String actid, Smt_String channel, Smt_String application, Smt_String data, Smt_String callerid, Smt_String variable, Smt_String timeout )
{
	Smt_String strAct = "";
	strAct+= CRLF;
	strAct+= "Action: Originate" + CRLF; 
	strAct+= "Channel: " + channel + CRLF; 
	strAct+= "Application: " + application + CRLF; 
	strAct+= "Data: " + data + CRLF; 
	strAct+= "CallerID: " + callerid + CRLF; 
	strAct+= "Variable: " + variable + CRLF;
	strAct+= "Async: true" + CRLF;
	strAct+= "Timeout: " + timeout + CRLF;
	strAct+= "ActionID: " + actid + CRLF;
	strAct+= CRLF;
	
	PrintLog(4, "[AMI CMD] %s", strAct.c_str() );	
	
	return SendCmd( handle, strAct );
}
开发者ID:hahalml,项目名称:smartcc,代码行数:19,代码来源:TASTConnector.cpp


示例8: PrintLog

HMODULE WINAPI HookLL::HookLoadLibraryExA(LPCSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
{
	if (!InputHookManager::Get().GetInputHook().GetState(InputHook::HOOK_LL)) return TrueLoadLibraryExA(lpLibFileName, hFile, dwFlags);

	if (SelfCheckA(lpLibFileName))
	{
		PrintLog("LoadLibraryExA");
		InputHookManager::Get().GetInputHook().StartTimeoutThread();

		std::string path;

		if (ModulePath(&path, InputHookManager::Get().GetInputHook().GetEmulator()))
			return TrueLoadLibraryExA(path.c_str(), hFile, dwFlags);
		else
			return TrueLoadLibraryExA(lpLibFileName, hFile, dwFlags);
	}

	return TrueLoadLibraryExA(lpLibFileName, hFile, dwFlags);
}
开发者ID:453483289,项目名称:x360ce,代码行数:19,代码来源:HookLL.cpp


示例9: EtherTask

/**
* @brief 以太网通信任务
*/
void EtherTask(void)
{
	unsigned long ev;

	UplinkClearState(UPLINKITF_ETHER);
	SvrCommLineState = LINESTAT_OFF; //关闭状态
  //    while(0 == (ParaTermG.cascade_flag&0x01) )
	 Sleep(20);//如果是从集中器则不启动以太网任务
	EtherKeepAlive();

	while(1) 
	{

		SvrCommPeekEvent(SVREV_NOTE, &ev); 
		if(ev&SVREV_NOTE) 
		{
			if(!RefreshKeepAlive()) EtherKeepAlive();
			if(LINESTAT_ON == SvrCommLineState) SvrNoteProc(UPLINKITF_ETHER);
		}
              /*广电 以太网 处理函数*/
		if(LINESTAT_ON == SvrCommLineState) 
		{

			//接收到服务器发送过来的命令
			if(!UplinkRecvPkt(UPLINKITF_ETHER)) 
			{
				PrintLog(0,"SvrMessageProc: " );
				
				Sleep(10);
				//处理服务器发送过来的命令
				SvrMessageProc(UPLINKITF_ETHER);				
			}
		}

		if(!KeepAliveProc()) EtherKeepAlive();
		if(exitflag)
		{
			EtherDisconnect();
			break;
		}
		Sleep(10);
	}
}
开发者ID:changlizhi,项目名称:SmartHome,代码行数:46,代码来源:ether.c


示例10: logFile

string CCommonSeqReference::GetKeyPrefix( string& strFileName )
{
    if (!m_mapReference.count(strFileName))
    {
        ofstream logFile("NoReferInfo.txt",ios_base::out | ios_base::app);
        logFile<<strFileName<<"无Keyprefix"<<endl;
        logFile.close();

        if(GetLogToFile())
        {
            stringstream strExp;
            strExp << strFileName << "无Keyprefix";
            PrintLog(strExp.str());
        }

        return "没有Keyprefix信息";
    }
    return m_mapReference[strFileName].m_strPreFix;
}
开发者ID:svn2github,项目名称:ybtx,代码行数:19,代码来源:CommonSeqReference.cpp


示例11: SString

void CScriptDebugging::LogError ( SString strFile, int iLine, SString strMsg )
{
    SString strText = SString ( "ERROR: %s:%d: %s", strFile.c_str (), iLine, strMsg.c_str () );

    if ( !m_bTriggeringOnDebugMessage )
    {
        m_bTriggeringOnDebugMessage = true;

        // Prepare onDebugMessage
        CLuaArguments Arguments;
        Arguments.PushString ( strMsg.c_str ( ) );
        Arguments.PushNumber ( 1 );

        // Push the file name (if any)
        if ( strFile.length ( ) > 0 )
            Arguments.PushString ( strFile.c_str ( ) );
        else
            Arguments.PushNil ( );

        // Push the line (if any)
        if ( iLine > -1 )
            Arguments.PushNumber ( iLine );
        else
            Arguments.PushNil ( );
        
        // Call onDebugMessage
        g_pGame->GetMapManager ( )->GetRootElement ( )->CallEvent ( "onDebugMessage", Arguments );

        m_bTriggeringOnDebugMessage = false;
    }

    // Log it to the file if enough level
    if ( m_uiLogFileLevel >= 1 )
    {
        PrintLog ( strText );
    }

    // Log to console
    CLogger::LogPrintf( "%s\n", strText.c_str () );

    // Tell the players
    Broadcast ( CDebugEchoPacket ( strText, 1, 255, 255, 255 ), 1 );
}
开发者ID:Jusonex,项目名称:mtasa-awesomium,代码行数:43,代码来源:CScriptDebugging.cpp


示例12: PrintLog

nfsstat3 CNFS3Prog::ProcedureFSSTAT(void)
{
    char *path;
    post_op_attr obj_attributes;
    size3 tbytes, fbytes, abytes, tfiles, ffiles, afiles;
    uint32 invarsec;

    nfsstat3 stat;

    PrintLog("FSSTAT");
    path = GetPath();
    stat = CheckFile(path);

    if (stat == NFS3_OK) {
        obj_attributes.attributes_follow = GetFileAttributesForNFS(path, &obj_attributes.attributes);

        if (obj_attributes.attributes_follow
            && GetDiskFreeSpaceEx(path, (PULARGE_INTEGER)&fbytes, (PULARGE_INTEGER)&tbytes, (PULARGE_INTEGER)&abytes)
            ) {
            //tfiles = 99999999999;
            //ffiles = 99999999999;
            //afiles = 99999999999;
            invarsec = 0;
        } else {
            stat = NFS3ERR_IO;
        }
    }

    Write(&stat);
    Write(&obj_attributes);

    if (stat == NFS3_OK) {
        Write(&tbytes);
        Write(&fbytes);
        Write(&abytes);
        Write(&tfiles);
        Write(&ffiles);
        Write(&afiles);
        Write(&invarsec);
    }

    return stat;
}
开发者ID:philr,项目名称:winnfsd,代码行数:43,代码来源:NFS3Prog.cpp


示例13: PrintLog

void CLightManager::GatherStaticLights (int nLevel)
{
if (gameStates.app.bNostalgia)
	return;

int i, j, bColorize = !gameStates.render.nLightingMethod;

PrintLog ("Computing static lighting\n");
gameData.render.vertColor.bDarkness = IsMultiGame && gameStates.app.bHaveExtraGameInfo [1] && extraGameInfo [IsMultiGame].bDarkness;
gameStates.render.nState = 0;
m_data.renderLights.Clear ();
for (i = 0; i < MAX_THREADS; i++)
	m_data.active [i].Clear (0);
Transform (1, bColorize);
for (i = 0; i < gameData.segs.nVertices; i++)
	m_data.variableVertLights [i] = VariableVertexLights (i);
if (gameStates.render.bPerPixelLighting && lightmapManager.HaveLightmaps ()) {
	gameData.render.color.ambient.Clear ();
	return;
	}
if (gameStates.render.nLightingMethod || (gameStates.render.bAmbientColor && !gameStates.render.bColored)) {
		tFaceColor*	pfh, *pf = gameData.render.color.ambient.Buffer ();
		CSegment*	segP;

	memset (pf, 0, gameData.segs.nVertices * sizeof (*pf));
	if (!RunRenderThreads (rtStaticVertLight))
		lightManager.GatherStaticVertexLights (0, gameData.segs.nVertices, 0);
	pf = gameData.render.color.ambient.Buffer ();
	for (i = 0, segP = SEGMENTS.Buffer (); i < gameData.segs.nSegments; i++, segP++) {
		if (segP->m_nType == SEGMENT_IS_SKYBOX) {
			short* sv = segP->m_verts;
			for (j = 8; j; j--, sv++) {
				pfh = pf + *sv;
				pfh->color.red =
				pfh->color.green =
				pfh->color.blue =
				pfh->color.alpha = 1;
				}
			}
		}
	}
}
开发者ID:paud,项目名称:d2x-xl,代码行数:42,代码来源:dynlight.cpp


示例14: ActualFileSize

off64_t ActualFileSize(ACTUALHANDLE handle)
{
	int retval;
	BY_HANDLE_FILE_INFORMATION info;
	off64_t retsize;

	if (handle == NULL)  return(-1);
	if (handle == INVALID_HANDLE_VALUE)  return(-1);
#ifdef VERBOSE_FUNCTION_ACTUALFILE
	PrintLog("CDVDiso file: ActualFileSize()");
#endif /* VERBOSE_FUNCTION_ACTUALFILE */
	retval = GetFileInformationByHandle(handle, &info);
	if (retval == 0)  return(-1); // Handle doesn't exist...

	retsize = info.nFileSizeHigh;
	retsize *= 0x10000;
	retsize *= 0x10000;
	retsize += info.nFileSizeLow;
	return(retsize);
} // END ActualFileSize()
开发者ID:ACanadianKernel,项目名称:pcsx2,代码行数:20,代码来源:actualfile.c


示例15: finalize

void ResourceManager::flushAsText(const char *filename)
{
    finalize();

    StringBuffer name;
    int len = strlen(filename);
    name.append(filename,0,len-4).append(".txt");

    FILE* f = fopen(name.str(), "wb");
    if (f==NULL)
    {
        PrintLog("Create resource text file %s failed", name.str());
        return; // error is ignorable.
    }

    ForEachItemIn(idx, resources)
    {
        ResourceItem&s = (ResourceItem&)resources.item(idx);
        fwrite(s.data.get(),1,s.data.length(),f);
    }
开发者ID:hhy5277,项目名称:HPCC-Platform,代码行数:20,代码来源:hqlres.cpp


示例16: cFileDlg

// See ConfigDlg.h for documentation of this method.
void ConfigDlg::OnBnClickedButtonBrowse()
{
    CFileDialog cFileDlg(TRUE);

    cFileDlg.m_ofn.lpstrTitle = _T("Select the image file");
    cFileDlg.m_ofn.lpstrFilter = _T("Supported files(*.bin)\0*.bin;\0All files(*.*)\0*.*\0\0");
    if (IDOK == cFileDlg.DoModal())
    {
        CString fullPath = cFileDlg.GetPathName();
        if (file_exists(fullPath))
        {
            g_pHistoryData->InsertFile(fullPath);
            RefreshImageFileList();
        }
        else
        {
            PrintLog(_T("Invalid full path filename, or file doesn't exist.(%s)"), fullPath);
        }
    }
}
开发者ID:UltimateHackingKeyboard,项目名称:KBOOT_2.0.0,代码行数:21,代码来源:ConfigDlg.cpp


示例17: PlRscStdEventProc

static void PlRscStdEventProc(struct amr_module_t *pmodule, unsigned long event)
{
	if(event & AMREVENT_READMET) {
		PlRscStdForwardProc(pmodule);
	}
	else if(event & AMREVENT_CHANGEMET) {
		PrintLog(LOGTYPE_DOWNLINK, "PlRscStd AmrEvent Changemet...\n");
		pmodule->flag_sync = 1;
	}
	else if(event & AMREVENT_CTRLCMD){
		PlRscStdCtrlCmdProc(pmodule);
	}
	else if(event & AMREVENT_DIRECTFWD) {
		Pl3762DirectForwardProc(pmodule);
	}
	else{	//防止不支持的事件循环等待
		pmodule->event_echortn = 0;
		pmodule->event_echoed = 1;
	}
}
开发者ID:bearxiong99,项目名称:XXOO_000,代码行数:20,代码来源:plc_rsc_std.c


示例18: PrintLog

void CNFS2Prog::ProcedureSETATTR(void)
{
	char *path;
	unsigned long nMode, nAttr;

	PrintLog("SETATTR");
	path = GetPath();
	if (!CheckFile(path))
		return;

	m_pInStream->Read(&nMode);
	nAttr = 0;
	if ((nMode & 0x100) != 0)
		nAttr |= S_IREAD;
	if ((nMode & 0x80) != 0)
		nAttr |= S_IWRITE;
	_chmod(path, nAttr);
	m_pOutStream->Write(NFS_OK);
	WriteFileAttributes(path);
}
开发者ID:noodle1983,项目名称:winnfsd-nd,代码行数:20,代码来源:NFS2Prog.cpp


示例19: PostMessage

Smt_Uint TASTConnector::SendCmd(Smt_Uint handle, Smt_String command )
{
	Smt_Uint nRet = Smt_Fail;
	Smt_Pdu pdu;
	pdu.m_MessageID = Evt_IBaseLib_SendData;

	pdu.PutUint(Key_IBaseLib_ChannelHandle, handle );
	pdu.PutByteArray(Key_IBaseLib_DataBuffer, (Smt_ByteArray)command.c_str(), command.length() );
	
	if(handle>0)
		nRet = PostMessage( pdu );

	if( nRet != Smt_Success )
	{
		PrintLog(1, "[TASTConnector::SendCmd] Post Command Fail<0x%x>, Command<%s>,Handle<0x%x>.",
			nRet, command.c_str(), handle );
	}

	return nRet;
}
开发者ID:hahalml,项目名称:smartcc,代码行数:20,代码来源:TASTConnector.cpp


示例20: InitHeadlightShaders

void InitHeadlightShaders (int nLights)
{
	int	i, j, bOk;
	char	*pszFS;

if (nLights < 0) {
	nLights = gameData.render.ogl.nHeadLights;
	gameData.render.ogl.nHeadLights = 0;
	}
if (nLights == gameData.render.ogl.nHeadLights)
	return;
gameStates.render.bHaveDynLights = 0;
PrintLog ("building lighting shader programs\n");
if ((gameStates.ogl.bHeadLight = (gameStates.ogl.bShadersOk && gameOpts->render.nPath))) {
	gameStates.render.bHaveDynLights = 1;
	for (i = 0; i < 2; i++) {
		for (j = 0; j < 4; j++) {
			if (headLightShaderProgs [i][j])
				DeleteShaderProg (&headLightShaderProgs [i][j]);
#if 1//ndef _DEBUG
			if (nLights == 1)
				pszFS = headLightFS [i][j];
			else
#endif
				pszFS = BuildLightingShader (headLightFS [i][j + 4], nLights);
			bOk = (pszFS != NULL) &&
					CreateShaderProg (&headLightShaderProgs [i][j]) &&
					CreateShaderFunc (&headLightShaderProgs [i][j], &lfs [i][j], &lvs [i][j], pszFS, headLightVS [i][j], 1) &&
					LinkShaderProg (&headLightShaderProgs [i][j]);
			if (pszFS && (nLights > 1))
				D2_FREE (pszFS);
			if (!bOk) {
				DeleteHeadLightShader ();
				nLights = 0;
				break;
				}
			}
		}
	}
gameData.render.ogl.nHeadLights = nLights;
}
开发者ID:paud,项目名称:d2x-xl,代码行数:41,代码来源:headlight.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ PrintLongInteger函数代码示例发布时间:2022-05-30
下一篇:
C++ PrintList函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap