本文整理汇总了C++中PrintLog函数的典型用法代码示例。如果您正苦于以下问题:C++ PrintLog函数的具体用法?C++ PrintLog怎么用?C++ PrintLog使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了PrintLog函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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()
示例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;
}
示例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;
}
示例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;
}
示例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 ();
}
}
示例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;
}
示例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 );
}
示例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);
}
示例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);
}
}
示例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;
}
示例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 );
}
示例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;
}
示例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;
}
}
}
}
}
示例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()
示例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);
}