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


C++ DebugError函数代码示例

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


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

示例1: DebugInfo

bool CPlayer::CanKillNow()
{
	DebugInfo("CanKillNow Start Socket=%d PID=%d",reinterpret_cast<int>(m_pClientSocket),m_PID);

	if ( m_pRoom )
	{
		if ( m_RoomID == m_pRoom->GetRoomID() )
		{
			if ( m_pTable )
			{
				if ( m_TableID == m_pTable->GetTableID() )
				{
					if ( m_pTable->GetTableState()==TABLE_ST_PLAYING && this->IsPlaying() )
					{
						return false;
					}
				}
				else
				{
					DebugError("CPlayer::CanKillNow PID=%d,TableID=%d",m_PID,m_TableID);
				}
			}
		}
		else
		{
			DebugError("CPlayer::CanKillNow PID=%d,RoomID=%d",m_PID,m_RoomID);
		}
	}

	DebugInfo("CanKillNow End Socket=%d PID=%d",reinterpret_cast<int>(m_pClientSocket),m_PID);

	return true;
}
开发者ID:moguigame,项目名称:AppGame,代码行数:33,代码来源:Player.cpp

示例2: if

	Eigen::Matrix4f MatrixFactory::createOrthoOffCenter
	(
		float left,
		float right,
		float bottom,
		float top,
		float near_plane,
		float far_plane,
		Handedness handedness
	) const
	{
		if (handedness == Handedness::RightHanded)
		{
		}
		else if (handedness == Handedness::LeftHanded)
		{
		}
		else
		{
			DebugError("Not implemented.");
		}

		DebugError("Not implemented.");
		return Eigen::Matrix4f::Identity();
	}
开发者ID:bschindler,项目名称:vcl,代码行数:25,代码来源:matrixfactory.cpp

示例3: DebugError

VOID
CVfrCompiler::UpdateInfoForDynamicOpcode (
  VOID
  )
{
  SIfrRecord          *pRecord;

  if (!gNeedAdjustOpcode) {
    return;
  }
  
  //
  // Base on the original offset info to update the record list.
  //
  if (!gCIfrRecordInfoDB.IfrAdjustDynamicOpcodeInRecords()) {
    DebugError (NULL, 0, 1001, "Error parsing vfr file", "Can find the offset in the record.");
  }

  //
  // Base on the opcode binary length to recalculate the offset for each opcode.
  //
  gCIfrRecordInfoDB.IfrAdjustOffsetForRecord();

  //
  // Base on the offset to find the binary address.
  //
  pRecord = gCIfrRecordInfoDB.GetRecordInfoFromOffset(gAdjustOpcodeOffset);
  while (pRecord != NULL) {
    pRecord->mIfrBinBuf = gCFormPkg.GetBufAddrBaseOnOffset(pRecord->mOffset);
    if (pRecord->mIfrBinBuf == NULL) {
      DebugError (NULL, 0, 0001, "Error parsing vfr file", " 0x%X. offset not allocated.", pRecord->mOffset);
    }
    pRecord = pRecord->mNext;
  }
}
开发者ID:fishyu2,项目名称:EDKII_GitSubmoduleTest,代码行数:35,代码来源:VfrCompiler.cpp

示例4: DebugError

VOID
CVfrCompiler::Compile (
  VOID
  )
{
  FILE  *pInFile    = NULL;
  CHAR8 *InFileName = NULL;
  INPUT_INFO_TO_SYNTAX InputInfo;

  if (!IS_RUN_STATUS(STATUS_PREPROCESSED)) {
    goto Fail;
  }

  InFileName = (mOptions.SkipCPreprocessor == TRUE) ? mOptions.VfrFileName : mOptions.PreprocessorOutputFileName;

  gCVfrErrorHandle.SetInputFile (InFileName);
  gCVfrErrorHandle.SetWarningAsError(mOptions.WarningAsError);

  if ((pInFile = fopen (LongFilePath (InFileName), "r")) == NULL) {
    DebugError (NULL, 0, 0001, "Error opening the input file", "%s", InFileName);
    goto Fail;
  }

  InputInfo.CompatibleMode = mOptions.CompatibleMode;
  if (mOptions.HasOverrideClassGuid) {
    InputInfo.OverrideClassGuid = &mOptions.OverrideClassGuid;
  } else {
    InputInfo.OverrideClassGuid = NULL;
  }

  if (VfrParserStart (pInFile, &InputInfo) != 0) {
    goto Fail;
  }

  fclose (pInFile);
  pInFile = NULL;

  if (gCFormPkg.HavePendingUnassigned () == TRUE) {
    gCFormPkg.PendingAssignPrintAll ();
    goto Fail;
  }

  SET_RUN_STATUS (STATUS_COMPILEED);
  return;

Fail:
  if (!IS_RUN_STATUS(STATUS_DEAD)) {
    DebugError (NULL, 0, 0003, "Error parsing", "compile error in file %s", InFileName);
    SET_RUN_STATUS (STATUS_FAILED);
  }
  if (pInFile != NULL) {
    fclose (pInFile);
  }
}
开发者ID:MattDevo,项目名称:edk2,代码行数:54,代码来源:VfrCompiler.cpp

示例5: _InitializeGlobals

static void _InitializeGlobals(int argc, char *argv[]) {
   char fileName[255];

   _processArgs(argc, argv);

   MSetAllocFailFunction(_AllocFailed);   

   if(gUseStartingNet) {
      gPriorNet = BNReadBIF(gStartingNetFile);
      if(gPriorNet == 0) {
         DebugError(1, "couldn't read net specified by -startFrom\n");
      }

      gEs = BNGetExampleSpec(gPriorNet);
   } else {
      sprintf(fileName, "%s/%s.names", gSourceDirectory, gFileStem);
      gEs = ExampleSpecRead(fileName);
      DebugError(gEs == 0, "Unable to open the .names file");

      gPriorNet = BNNewFromSpec(gEs);
   }

   gInitialParameterCount = BNGetNumParameters(gPriorNet);
   gBranchFactor = BNGetNumNodes(gPriorNet) * BNGetNumNodes(gPriorNet);
   if(gLimitBytes != -1) {
      gMaxBytesPerModel = gLimitBytes / BNGetNumNodes(gPriorNet);
      //gMaxBytesPerModel = gLimitBytes / gBranchFactor;
      DebugMessage(1, 2, "Limit models to %.4lf megs\n", 
                     gMaxBytesPerModel / (1024.0 * 1024.0));
   }

   gCurrentNet = BNClone(gPriorNet);
   BNZeroCPTs(gCurrentNet);

   RandomInit();
   /* seed */
   if(gSeed != -1) {
      RandomSeed(gSeed);
   } else {
      gSeed = RandomRange(1, 30000);
      RandomSeed(gSeed);
   }

   DebugMessage(1, 1, "running with seed %d\n", gSeed);
   DebugMessage(1, 1, "allocation %ld\n", MGetTotalAllocation());
   DebugMessage(1, 1, "initial parameters %ld\n", gInitialParameterCount);

}
开发者ID:burnmg,项目名称:vfml,代码行数:48,代码来源:vfbn2.c

示例6: strlen

VOID
CVfrCompiler::AppendIncludePath (
  IN CHAR8      *PathStr
  )
{
  UINT32  Len           = 0;
  CHAR8   *IncludePaths = NULL;

  Len = strlen (" -I ") + strlen (PathStr) + 1;
  if (mOptions.IncludePaths != NULL) {
    Len += strlen (mOptions.IncludePaths);
  }
  IncludePaths = new CHAR8[Len];
  if (IncludePaths == NULL) {
    DebugError (NULL, 0, 4001, "Resource: memory can't be allocated", NULL);
    return;
  }
  IncludePaths[0] = '\0';
  if (mOptions.IncludePaths != NULL) {
    strcat (IncludePaths, mOptions.IncludePaths);
  }
  strcat (IncludePaths, " -I ");
  strcat (IncludePaths, PathStr);
  if (mOptions.IncludePaths != NULL) {
    delete mOptions.IncludePaths;
  }
  mOptions.IncludePaths = IncludePaths;
}
开发者ID:fishyu2,项目名称:EDKII_GitSubmoduleTest,代码行数:28,代码来源:VfrCompiler.cpp

示例7: locker

void ThreadResult::reportErr(const ErrorLogger::ErrorMessage &msg)
{
    QMutexLocker locker(&mutex);

    QList<unsigned int> lines;
    QStringList files;

    for (std::list<ErrorLogger::ErrorMessage::FileLocation>::const_iterator tok = msg._callStack.begin();
         tok != msg._callStack.end();
         ++tok)
    {
        files << QString((*tok).getfile(false).c_str());
        lines << (*tok).line;
    }

    ErrorItem item;
    item.file = QString(callStackToString(msg._callStack).c_str());
    item.files = files;
    item.id = QString(msg._id.c_str());
    item.lines = lines;
    item.summary = QString::fromStdString(msg.shortMessage());
    item.message = QString::fromStdString(msg.verboseMessage());
    item.severity = msg._severity;
    item.inconclusive = msg._inconclusive;

    if (msg._severity != Severity::debug)
        emit Error(item);
    else
        emit DebugError(item);
}
开发者ID:zblair,项目名称:cppcheck,代码行数:30,代码来源:threadresult.cpp

示例8: My_Sys_SetModuleOffset

void __cdecl My_Sys_SetModuleOffset(char* moduleName, void* offset) {
    // We should be getting qagame, but check just in case.
    if (!strcmp(moduleName, "qagame")) {
        // Despite the name, it's not the actual module, but vmMain.
        // We use dlinfo to get the base of the module so we can properly
        // initialize all the pointers relative to the base.
    	qagame_dllentry = offset;

        Dl_info dlinfo;
        int res = dladdr(offset, &dlinfo);
        if (!res) {
            DebugError("dladdr() failed.\n", __FILE__, __LINE__, __func__);
            qagame = NULL;
        }
        else {
            qagame = dlinfo.dli_fbase;
        }
        DebugPrint("Got qagame: %#010x\n", qagame);
    }
    else
        DebugPrint("Unknown module: %s\n", moduleName);
    
    Sys_SetModuleOffset(moduleName, offset);
    if (common_initialized) {
    	SearchVmFunctions();
    	HookVm();
    	InitializeVm();
    }
}
开发者ID:PerpetualWar,项目名称:minqlx,代码行数:29,代码来源:hooks.c

示例9: Besseli

CReal Besseli(const CReal rNu, const CReal rZ)
{
	const CReal	rEp = (CReal) 10e-9; /* Define accuracy */
	const CReal	rY = rZ / (CReal) 2.0;
	CReal		rReturn = (CReal) 1.0;
	CReal		rD = (CReal) 1.0;
	CReal		rS = (CReal) 1.0;

#ifdef _DEBUG_
	/* Only nu = 0 is supported right now! */
	if (rNu != (CReal) 0.0)
	{
		DebugError("MatLibr: Besseli function", "The nu = ", rNu, \
			" is not supported, only nu = ", 0);
	}
#endif

	for (int i = 1; i <= 25 && rReturn * rEp <= rS; i++)
	{
		rD *= rY / i;
		rS = rD * rD;
		rReturn += rS;
	}

	return rReturn;
}
开发者ID:tuyenth,项目名称:utece-soc-drm,代码行数:26,代码来源:MatlibSigProToolbox.cpp

示例10: main

int main(int argc, char *argv[]) {
   BeliefNet bn, cbn;
   FILE *dataFile;
   ExamplePtr e;
   long numSeen = 0;
   double llSum = 0;

   _processArgs(argc, argv);

   bn = _readBN(gBeliefNetFile);

   if(gDoSmooth) {
      BNSetPriorStrength(bn, gPriorStrength);
      BNSmoothProbabilities(bn, 1);
      if(DebugGetMessageLevel() > 2) {
         BNWriteBIF(bn, stdout);
      }
   }

   if(gCompareToNet) {
      cbn = _readBN(gCompareNetFile);

      if(gDoSmooth) {
         BNSetPriorStrength(cbn, gPriorStrength);
         BNSmoothProbabilities(cbn, 1);
      }

      DebugMessage(1, 0, "Structural Difference: %d\n",
         _GetStructuralDifference(bn, cbn));
      
   } else {
      if(gStdin) {
         dataFile = stdin;
      } else {
         dataFile = fopen(gDataFile, "r");
         DebugError(dataFile == 0, "Unable to open datafile.");
      }

      e = ExampleRead(dataFile, BNGetExampleSpec(bn));
      while(e != 0) {
         numSeen++;

         llSum += BNGetLogLikelihood(bn, e);

         ExampleFree(e);
         e = ExampleRead(dataFile, BNGetExampleSpec(bn));
      }

      DebugMessage(1, 1, "Average Log Likelihood of %s on %s is: ",
              gBeliefNetFile, gDataFile);
      DebugMessage(1, 0, "%lf\n", llSum / (double)numSeen);

      if(!gStdin) {
        fclose(dataFile);
      } 
   }

   return 0;
}
开发者ID:burnmg,项目名称:vfml,代码行数:59,代码来源:beliefnetscore.c

示例11: tan

	Eigen::Matrix4f MatrixFactory::createPerspectiveFov
	(
		float near_plane,
		float far_plane,
		float aspect_ratio,
		float fov_vertical,
		Handedness handedness
	) const
	{
		if (handedness == Handedness::RightHanded)
		{
			float h = 1.0f / tan(fov_vertical / 2.0f);
			float w = h / aspect_ratio;

			// z device coordinates [0, 1]
			float _33 = far_plane / (near_plane - far_plane);
			float _34 = near_plane * _33;

			// z device coordinates [-1, 1]
			//float _33 = (near_plane + far_plane) / (near_plane - far_plane);
			//float _34 = (2 * near_plane * far_plane) / (near_plane - far_plane);
			
			Eigen::Matrix4f matrix;
			matrix << w, 0, 0, 0,
					  0, h, 0, 0,
					  0, 0, _33, _34,
					  0, 0, -1, 0;
			
			return matrix;
		}
		else if (handedness == Handedness::LeftHanded)
		{
			float h = 1.0f / tan(fov_vertical / 2.0f);
			float w = h / aspect_ratio;

			// z device coordinates [0, 1]
			float _33 = far_plane / (far_plane - near_plane);
			float _34 = -near_plane * _33;

			// z device coordinates [-1, 1]
			//float _33 = (near_plane + far_plane) / (far_plane - near_plane);
			//float _34 = -(2 * near_plane * far_plane) / (far_plane - near_plane);
			
			Eigen::Matrix4f matrix;
			matrix << w, 0, 0, 0,
					  0, h, 0, 0,
					  0, 0, _33, _34,
					  0, 0, 1, 0;
			
			return matrix;
		}
		else
		{
			DebugError("Not implemented.");
			return Eigen::Matrix4f::Identity();
		}
	}
开发者ID:bschindler,项目名称:vcl,代码行数:57,代码来源:matrixfactory.cpp

示例12: DebugError

VOID
CVfrCompiler::Compile (
  VOID
  )
{
  FILE  *pInFile    = NULL;
  CHAR8 *InFileName = NULL;

  if (!IS_RUN_STATUS(STATUS_PREPROCESSED)) {
    goto Fail;
  }

  InFileName = (mOptions.SkipCPreprocessor == TRUE) ? mOptions.VfrFileName : mOptions.PreprocessorOutputFileName;

  gCVfrErrorHandle.SetInputFile (InFileName);

  if ((pInFile = fopen (InFileName, "r")) == NULL) {
    DebugError (NULL, 0, 0001, "Error opening the input file", InFileName);
    goto Fail;
  }

  if (VfrParserStart (pInFile, mOptions.CompatibleMode) != 0) {
    goto Fail;
  }

  fclose (pInFile);

  if (gCFormPkg.HavePendingUnassigned () == TRUE) {
    gCFormPkg.PendingAssignPrintAll ();
    goto Fail;
  }

  SET_RUN_STATUS (STATUS_COMPILEED);
  return;

Fail:
  if (!IS_RUN_STATUS(STATUS_DEAD)) {
    DebugError (NULL, 0, 0003, "Error parsing", "compile error in file %s", InFileName);
    SET_RUN_STATUS (STATUS_FAILED);
  }
  if (pInFile != NULL) {
    fclose (pInFile);
  }
}
开发者ID:professor-nishui,项目名称:loongson-uefi,代码行数:44,代码来源:VfrCompiler.cpp

示例13: DebugError

void CPlayer::AddMoGuiMoney(INT32 nMoney)
{
	if ( nMoney>=0 && m_nMoGuiMoney+nMoney>=0 )
	{
		m_nMoGuiMoney += nMoney;
	}
	else
	{
		DebugError("AddMoGuiMoney PID=%-10d m_nMoGuiMoney=%d nMoney=%d",m_PID,m_nMoGuiMoney,nMoney );
	}
}
开发者ID:moguigame,项目名称:AppGame,代码行数:11,代码来源:Player.cpp

示例14: DebugError

	void chunk::create(){
		pblocks = new block[4096];
		pbrightness = new brightness[4096];
		//memset(pblocks, 0, sizeof(pblocks));
		//memset(pbrightness, 0, sizeof(pbrightness));
#ifdef NEWORLD_DEBUG_CONSOLE_OUTPUT
		if (pblocks == nullptr || pbrightness == nullptr){
			DebugError("Allocate memory failed!");
		}
#endif
	}
开发者ID:haozi23333,项目名称:NEWorld,代码行数:11,代码来源:Chunk.cpp

示例15: init

	void init(string ip, unsigned short _port) {
		Net::startup();

		try {
			socketClient.connectIPv4(ip, _port);
		}
		catch (...) {
			DebugError("Cannot connect to the server!");
			return;
		}

		threadRun = true;
		mutex = MutexCreate();
		t = ThreadCreate(networkThread, NULL);
	}
开发者ID:435886030,项目名称:NEWorld,代码行数:15,代码来源:Network.cpp


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