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


C++ Report函数代码示例

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


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

示例1: Report

void AnticheatMgr::WalkOnWaterHackDetection(Player* player, MovementInfo movementInfo)
{
	uint32 key = player->GetGUIDLow();

	if (!m_Players[key].GetLastMovementInfo().HasMovementFlag(MOVEMENTFLAG_WATERWALKING))
		return;

	// if we are a ghost we can walk on water
	if (!player->IsAlive())
		return;

	if (player->HasAuraType(SPELL_AURA_FEATHER_FALL) || player->HasAuraType(SPELL_AURA_SAFE_FALL) || player->HasAuraType(SPELL_AURA_WATER_WALK))
		return;

	Report(player, WALKWATER_HACK);
}
开发者ID:Rastrian,项目名称:DeathCore_3.3.5,代码行数:16,代码来源:AnticheatMgr.cpp

示例2: RegistryWrite

// Write text to the registry
void RegistryWrite(HKEY root, read path, read name, read value) {

	// Open the key
	registryitem registry;
	if (!registry.Open(root, path)) return;

	// Set or make and set the text value
	int result = RegSetValueEx(
		registry.key,                         // Handle to an open key
		name,                                 // Name of the value to set or make and set
		0,
		REG_SZ,                               // Variable type is a null-terminated string
		(const byte *)value,                  // Address of the value data to load
		(length(value) + 1) * sizeof(WCHAR)); // Size of the value data in bytes, add 1 to write the null terminator
	if (result != ERROR_SUCCESS) Report(L"error regsetvalueex");
}
开发者ID:zootella,项目名称:backup,代码行数:17,代码来源:platform+registry.cpp

示例3: Report

//	TAccountXmpp::IRuntimeObject::PGetRuntimeInterface()
//
//	Enable the TAccountXmpp object to respond to the interface of other objects it is related to, such as TCertificate and TCertificateServerName
POBJECT
TAccountXmpp::PGetRuntimeInterface(const RTI_ENUM rti, IRuntimeObject * piParent) const
	{
	Report(piParent == NULL);
	switch (rti)
		{
	case RTI(TCertificate):
		return Certificate_PGet_YZ();
	case RTI(TCertificateServerName):
		return Certificate_PGetServerName();
	case RTI(TContact):	// TODO: Without this line, there is a stack overvlow
		return NULL;
	default:
		return TAccountCore::PGetRuntimeInterface(rti, m_pProfileParent);
		}
	}
开发者ID:voodoo-chile,项目名称:Cambrian-src,代码行数:19,代码来源:TAccount.cpp

示例4: ReportLibmngError

/// report libmng error information 
void ReportLibmngError (iObjectRegistry *object_reg, mng_handle hMNG, const char* msg)
{
  mng_int8     severity;
  mng_chunkid  chunkname;
  mng_uint32   chunkseq;
  mng_int32    extra1;
  mng_int32    extra2;
  mng_pchar    errortext;

  mng_getlasterror (hMNG, &severity, &chunkname, &chunkseq, &extra1, 
    &extra2, &errortext);

  Report (object_reg, CS_REPORTER_SEVERITY_WARNING,
    "%s: %s (severity %" PRId8 ", chunkname %.8" PRIx32 ", chunkseq %" PRIu32 ", %.8" PRIx32 ", %.8" PRIx32 ")",
    msg, errortext, severity, chunkname, chunkseq, extra1, extra2);
}
开发者ID:garinh,项目名称:cs,代码行数:17,代码来源:jng.cpp

示例5: CreateLogWindow

void
CMessageLog::Show()
	{
	#ifdef CONFIG_MESSAGE_LOG_WIN32
	if (m_hwndMessageLog == NULL)
		CreateLogWindow();
	::ShowWindow(m_hwndMessageLog, SW_SHOW);
	if (!g_fMessageLogsPaused)
		::SendMessage(m_hwndRichEdit, WM_VSCROLL, SB_BOTTOM, d_zNA);	// When the Message Log becomes visible, scroll at the bottom so the user may see the most recent messages.
	#else
	Report(m_pwChatDebugger != NULL && "The widget should have been created!");
	if (m_pwChatDebugger == NULL)
		CreateLogWindow();
	m_pwChatDebugger->show();
	#endif
	}
开发者ID:tcolussi,项目名称:Cambrian-src,代码行数:16,代码来源:ErrorMessages.cpp

示例6: _T

void COXEventLog::ReportError(LPCTSTR pszStringToReport)
	{
	LPCTSTR string_array[1];

	if (pszStringToReport == (LPCTSTR)NULL)
		{
		string_array[0] = _T("COXEventLog::ReportError(NULL)");
		}
	else
		{
		string_array[0] = pszStringToReport;
		}

	TRACE0("COXEventLog::ReportError()\n");
	Report(eventError, 0, 0, 1, string_array);
	}
开发者ID:Spritutu,项目名称:AiPI-1,代码行数:16,代码来源:EVNTLOG.CPP

示例7: while

const char* GenmeshAnimationPDLFactory::ParseBuffer (iSyntaxService* synsrv,
                                                     ColorBuffer& buffer, 
                                                     iDocumentNode* node)
{
  csRef<iDocumentNodeIterator> it = node->GetNodes ();
  while (it->HasNext ())
  {
    csRef<iDocumentNode> child = it->Next ();
    if (child->GetType () != CS_NODE_ELEMENT) continue;
    const char* value = child->GetValue ();
    csStringID id = xmltokens.Request (value);
    switch (id)
    {
      case XMLTOKEN_STATICCOLORS:
        {
          buffer.staticColors = synsrv->ParseRenderBuffer (child);
          if (!buffer.staticColors)
            return "Could not parse <staticcolors>";
	}
        break;
      case XMLTOKEN_LIGHT:
        {
          ColorBuffer::MappedLight light;
	  const char* err = ParseLight (light, synsrv, child);
	  if (err)
          {
            Report (synsrv, CS_REPORTER_SEVERITY_WARNING,
              child, "Could not parse light: %s", err);
          }
          else
            buffer.lights.Push (light);
	}
        break;
      default:
        parseError.Format ("Unknown token %s", CS::Quote::Single (value));
        return parseError;
    }
  }

  if (!buffer.staticColors)
    return "No <staticcolors> given";

  const char* err = ValidateBufferSizes (buffer);
  if (err) return err;

  return 0;
}
开发者ID:GameLemur,项目名称:Crystal-Space,代码行数:47,代码来源:gmeshanimpdl.cpp

示例8: check_fast

static void check_fast(void)
{ Carrier	*carrier	= NULL;
  int		 checksum;
  int		 i;
  int		 tmp;
  int		*wptr;
  int		 failures	= 0;
  int		 iterations	= 0;

  carrier = AllocFast(FastmemSize, &(MyTask->MemPool));
  Signal(&ThreadsReady);

  if (carrier == NULL)
   { Report("warning, failed to allocate on-chip memory.");
     Wait(&ResultsLock);
     Results.OnchipMemory	= 0;
     Results.OnchipFailures	= 0;
     Signal(&ResultsLock);
     Signal(&ResultsReady);
     return;
   }

	/* Fill the on-chip memory with random data.			*/
  wptr = (int *) carrier->Addr;
  for (i = 0, checksum = 0; i < (FastmemSize / sizeof(int)); i++)
   { wptr[i]	 = hw_rand();
     checksum	+= wptr[i];
   }

  for (iterations = 0; ; iterations++)
   { for (i = 0; (i < MemoryInterval) && !Finished; i++)
      Delay(OneSec);
     if (Finished) break;

     for (i = 0, tmp = 0; i < (FastmemSize / sizeof(int)); i++)
      tmp += wptr[i];
     if (tmp != checksum)
      { failures++; checksum = tmp; }
   }

  Wait(&ResultsLock);
  Results.OnchipMemory		= FastmemSize;
  Results.OnchipFailures	= failures;
  Results.OnchipIterations	= iterations;
  Signal(&ResultsLock);
  Signal(&ResultsReady);
}
开发者ID:jamjr,项目名称:Helios-NG,代码行数:47,代码来源:hwtest.c

示例9: Initialize

csPtr<iShader> csXMLShaderCompiler::CompileShader (
    	iLoaderContext* ldr_context, iDocumentNode *templ,
	int forcepriority)
{
  if (!templ) return 0;

  if (!ValidateTemplate (templ))
    return 0;

  /* We might only be loaded as a dependency of the engine, so query it
     here instead of Initialize() */
  if (!engine.IsValid())
  {
    engine = csQueryRegistry<iEngine> (objectreg);
    sharedEvaluator->SetEngine (engine);
  }
  
  csTicks startTime = 0, endTime = 0;
  // Create a shader. The actual loading happens later.
  csRef<csXMLShader> shader;
  if (do_verbose) startTime = csGetTicks();
  shader.AttachNew (new csXMLShader (this, ldr_context, templ, forcepriority));
  if (!shader->Load (templ)) return 0;
  if (do_verbose) endTime = csGetTicks();
  shader->SetName (templ->GetAttributeValue ("name"));
  shader->SetDescription (templ->GetAttributeValue ("description"));
  if (do_verbose)
  {
    csString str;
    shader->DumpStats (str);
    Report(CS_REPORTER_SEVERITY_NOTIFY, 
      "Shader %s: %s, %u ms", shader->GetName (), str.GetData (),
      endTime - startTime);
  }

  csRef<iDocumentNodeIterator> tagIt = templ->GetNodes ("key");
  while (tagIt->HasNext ())
  {
    // @@@ FIXME: also keeps "editoronly" keys
    csRef<iKeyValuePair> keyvalue = synldr->ParseKey (tagIt->Next ());
    if (keyvalue)
      shader->QueryObject ()->ObjAdd (keyvalue->QueryObject ());
  }

  csRef<iShader> ishader (shader);
  return csPtr<iShader> (ishader);
}
开发者ID:GameLemur,项目名称:Crystal-Space,代码行数:47,代码来源:xmlshader.cpp

示例10: Trace

void CEodStepLoadIvBands::OnIvData(EODIV::CIvIvBandsResultPtr pResult)
{	
	if(_IsCancel() || IsStopping())
		throw EODCO::CEodStopException();

	Trace(EODCO::enTrLogDebug,__FUNCTION__,_T("Start"));

	EODMS::CMsUndCollPtr spUndColl = m_Request.Und();

	ATLASSERT(spUndColl);

	EODMS::CMsUndPtr spUnd(GetCollectionItem<EODMS::CMsUndPtr>(spUndColl, pResult->m_strUndSymbol));

	ATLASSERT(spUnd);

	if(spUnd)
	{
		if(!EODCO::IsBadValue(pResult->m_dIVBandHigh) && !EODCO::IsBadValue(pResult->m_dIVBandLow))
		{
			CString sExecQuery;
			sExecQuery.Format(_T("exec usp_EodVolaBands_Save %d,%d,%f,%f,%f;"),spUnd->m_nID,pResult->m_nExpPeriod,
								(100. + static_cast<double>(pResult->m_nStrikeMoneyness)) / 100. ,
								pResult->m_dIVBandLow,
								pResult->m_dIVBandHigh);

			m_nUndInQuery++;
			m_sQueryBuffer += sExecQuery;

			if(m_nUndInQuery >= 200L)
				_SaveBuffer();
		}

		size_t nAllUnd = spUndColl->size();

		size_t nProgress = 100 * m_Request.UndSend() / nAllUnd;

		if(m_nProgress != nProgress)
		{
			m_nProgress = nProgress;
			Report(StepMask(),enRpMtProgress, _T("%d"), m_nProgress);
			CEodServer::s_pEodServer->StepsMgr()->IncProgress();
		}
	}

	Trace(EODCO::enTrLogDebug,__FUNCTION__,_T("Completed"));
}
开发者ID:AlexS2172,项目名称:IVRMstandard,代码行数:46,代码来源:EodLoadIvBands.cpp

示例11: Execute

int ValidateCommand :: Execute( ALib::CommandLine & cmd ) {

	GetSkipOptions( cmd );
	GetOutputMode( cmd );
	ReadValidationFile( cmd );

	IOManager io( cmd );
	CSVRow row;

	// we optionally return an error code to the shell if validation failed
	int errtotal = 0;
	bool errcode = cmd.HasFlag( FLAG_ERRCODE );

	while( io.ReadCSV( row ) ) {
		if ( Skip( io, row ) ) {
			continue;
		}
		int errcount = 0;
		for ( unsigned int i = 0; i < mRules.size(); i++ ) {
			ValidationRule::Results res = mRules[i]->Apply( row );

			if ( res.size() && mOutMode == Reports ) {
				Report( io, res, errcount );
				errcount++;
				errtotal += errcount;
				continue;
			}

			if ( res.size() ) {
				errcount++;
				if ( mOutMode == Fails ) {
					io.WriteRow( row );
					break;
				}
			}
		}
		if ( mOutMode == Passes && errcount == 0 ) {
			io.WriteRow( row );
		}
		errtotal += errcount;
	}

    // exit code of 2 indicates program detected invalid data
	return errtotal && errcode ? 2 : 0;
}
开发者ID:bminossi,项目名称:csvfix,代码行数:45,代码来源:csved_valid.cpp

示例12: correctRegex

void DataMemberChecker::checkASTDecl(const clang::FieldDecl* D,
                                clang::ento::AnalysisManager& Mgr,
                                clang::ento::BugReporter& BR) const {
  const char *reportDescription = "[sas.CodingConventions.FCCSW.DataMember] Data member variable names must begin with 'm_' followed by a lowerCamelCase name.";
  std::regex correctRegex("^m_[a-z][a-zA-Z0-9]+");
  auto nameString = D->getNameAsString();
  auto parent = D->getParent();

  if (parent->isStruct()) {
      return;
      // Does not apply to public members of structs
  }

  if (!std::regex_match(nameString, correctRegex)) {
    Report(D, reportDescription, BR);
  }
  
}
开发者ID:davidho95,项目名称:SAS,代码行数:18,代码来源:DataMemberChecker.cpp

示例13: index

Wiimote::Wiimote(const unsigned int _index)
	: index(_index)
#ifdef __APPLE__
	, inputlen(0)
#elif defined(__linux__) && HAVE_BLUEZ
	, out_sock(-1), in_sock(-1)
#elif defined(_WIN32)
	, dev_handle(0), stack(MSBT_STACK_UNKNOWN)
#endif
	, leds(0), m_last_data_report(Report((u8 *)NULL, 0))
	, m_channel(0), m_connected(false)
{
#if defined(__linux__) && HAVE_BLUEZ
	bdaddr = (bdaddr_t){{0, 0, 0, 0, 0, 0}};
#endif

	DisableDataReporting();
}
开发者ID:NullNoname,项目名称:dolphin,代码行数:18,代码来源:WiimoteReal.cpp

示例14: GetNextArg

bool csWrappedDocumentNode::ProcessUndef (NodeProcessingState* state, 
                                          iDocumentNode* node, 
                                          const TempString<>& args)
{
  TempString<> param;
  const char* p = args;
  GetNextArg (p, param);
  if (p) { while (*p && isspace (*p)) p++; }
  if (param.IsEmpty() || (*p != 0))
  {
    Report (syntaxErrorSeverity, node,
            "One parameter expected for %s",
	    CS::Quote::Single ("Undef"));
    return false;
  }
  globalState->defines.Delete (param);
  return true;
}
开发者ID:GameLemur,项目名称:Crystal-Space,代码行数:18,代码来源:docwrap.cpp

示例15: _ReadBootInfo

static _i32 _ReadBootInfo(sBootInfo_t *psBootInfo)
{
    _i32 lFileHandle;
    _u32 ulToken;
    _i32 status = -1;

    if( 0 == sl_FsOpen((_u8 *)IMG_BOOT_INFO, FS_MODE_OPEN_READ, &ulToken, &lFileHandle) )
    {
        if( 0 < sl_FsRead(lFileHandle, 0, (_u8 *)psBootInfo, sizeof(sBootInfo_t)) )
        {
            status = 0;
            Report("ReadBootInfo: ucActiveImg=%d, ulImgStatus=0x%x\n\r", psBootInfo->ucActiveImg, psBootInfo->ulImgStatus);
        }
        sl_FsClose(lFileHandle, 0, 0, 0);
    }

    return status;
}
开发者ID:yuch7,项目名称:cc3200-MCU,代码行数:18,代码来源:flc.c


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