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


C++ Analyze函数代码示例

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


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

示例1: Analyze

void AbstractTarget::AllocateArrays(int sizeX, int sizeY, int sizeZ, bool bWithIxyz)
{
	if ((sizeX != nx) || (sizeY != ny) || (sizeZ != nz))
	{
		int del = Analyze(sizeX);
		if (del > 0) maxJx += del;
		nx = sizeX;
		del = Analyze(sizeY);
		if (del > 0) maxJy += del;
		ny = sizeY;
		del = Analyze(sizeZ);
		if (del > 0) maxJz += del;
		nz = sizeZ;
		nat = nx * ny * nz;
		iocc = (bool *)realloc(iocc, nat * sizeof(bool));
		memset(iocc, 0, nat * sizeof(bool));
		icomp.Deallocate();
		icomp.Dimension(nat, 3);
		icomp.Clear();
		if (bWithIxyz)
		{
			ixyz.Deallocate();
			ixyz.Dimension(nat, 3);
			ixyz.Clear();
		}
	}
}
开发者ID:jstotero,项目名称:ddscatcpp,代码行数:27,代码来源:AbstractTarget.cpp

示例2: Analyze

bool DependenciesAnalyzer::Analyze()
{
    if (layout)
        return Analyze(layout->GetEvents(), true);
    else if (externalEvents)
        return Analyze(externalEvents->GetEvents(), true);

    std::cout << "ERROR: DependenciesAnalyzer called without any layout or external events.";
    return false;
}
开发者ID:Slulego,项目名称:GD,代码行数:10,代码来源:DependenciesAnalyzer.cpp

示例3: Analyze

	bool Analyze(int aKindPai[], int zipai)
	{
		if (aKindPai[0] == 0) {

			return true;	
		}

		//寻找第一张字牌
		int j = 1;
		for (j = 1; j < 10; j ++) {

			if (aKindPai[j] != 0) 
				break;
		}

		bool result;
		if (aKindPai[j] >= 3)	//作为壳子
		{
			aKindPai[j] -= 3;
			aKindPai[0] -= 3;
			result = Analyze(aKindPai, zipai);
			//还原这三张
			aKindPai[j] += 3;
			aKindPai[0] +=3;
			return result;
		}

		//作为顺牌
		if ((!zipai) && (j < 8) 
			&& (aKindPai[j+1] > 0)
			&& (aKindPai[j+2]) > 0)
		{
			//除去这三张
			aKindPai[j] --;
			aKindPai[j+1] --;
			aKindPai[j+2] --;
			aKindPai[0] -= 3;
			result = Analyze(aKindPai, zipai);
			//还原这三张顺子
			aKindPai[j] ++;
			aKindPai[j+1] ++;
			aKindPai[j+2] ++;
			aKindPai[0] += 3;
			return result;
		}

		return false;
	}
开发者ID:liuwanbing,项目名称:liuwanbing,代码行数:48,代码来源:basic_algorithms.cpp

示例4: SetFieldBinary

int CAPETag::SetFieldBinary(const str_utf16 * pFieldName, const void * pFieldValue, int nFieldBytes, int nFieldFlags)
{
    if (m_bAnalyzed == FALSE) { Analyze(); }
    if (pFieldName == NULL) return -1;

    // check to see if we're trying to remove the field (by setting it to NULL or an empty string)
    BOOL bRemoving = (pFieldValue == NULL) || (nFieldBytes <= 0);

    // get the index
    int nFieldIndex = GetTagFieldIndex(pFieldName);
    if (nFieldIndex != -1)
    {
        // existing field

        // fail if we're read-only (and not ignoring the read-only flag)
        if ((m_bIgnoreReadOnly == FALSE) && (m_aryFields[nFieldIndex]->GetIsReadOnly()))
            return -1;
        
        // erase the existing field
        SAFE_DELETE(m_aryFields[nFieldIndex])

        if (bRemoving)
        {
            return RemoveField(nFieldIndex);
        }
    }
    else
    {
        if (bRemoving)
开发者ID:ariasrodolfo,项目名称:monkeys-audio,代码行数:29,代码来源:APETag.cpp

示例5: InitCaption

BOOL CARIB8CharDecode::Caption( const BYTE* pbSrc, DWORD dwSrcSize, vector<CAPTION_DATA>* pCaptionList )
{
	if( pbSrc == NULL || dwSrcSize == 0 || pCaptionList == NULL){
		return FALSE;
	}
	InitCaption();
	m_pCaptionList = pCaptionList;

	BOOL bRet = TRUE;
	DWORD dwReadCount = 0;
	while(dwReadCount<dwSrcSize){
		DWORD dwReadSize = 0;
		BOOL bRet = Analyze(pbSrc+dwReadCount, dwSrcSize-dwReadCount, &dwReadSize );
		if( bRet == TRUE ){
			if( m_strDecode.size() > 0 ){
				CheckModify();
			}
		}else{
			pCaptionList->clear();
			break;
		}
		m_strDecode = "";
		dwReadCount+=dwReadSize;
	}
	return bRet;
}
开发者ID:Velmy,项目名称:EDCB,代码行数:26,代码来源:ARIB8CharDecode.cpp

示例6: HIWORD

BOOL CThhylDlg::OnCommand(WPARAM wParam, LPARAM lParam) 
{
	// TODO: Add your specialized code here and/or call the base class
	const WORD notifycode = HIWORD(wParam);
	const WORD id         = LOWORD(wParam);

	if (id == IDC_RPYFILE) { // “录像文件”编辑框
		if (notifycode == EN_KILLFOCUS) {
			// 焦点离开编辑框时不接受用户在编辑框中输入的路径,除非用户按了回车。
			UpdateData(FALSE);
			return TRUE;
		}
	}

	// menu commands and others
	switch(id)
	{
	case IDM_CHANGEENCODESTART+0: cfg.InfoCode = 932; break;
	case IDM_CHANGEENCODESTART+1: cfg.InfoCode = 936; break;
	case IDM_CHANGEENCODESTART+2: cfg.InfoCode = 950; break;
	case IDM_CHANGEENCODESTART+3: cfg.InfoCode = 0; break;
	default: return CDlgBaseWZ::OnCommand(wParam, lParam);
	}
	
	cfg.CommentCode = cfg.InfoCode;
	if(m_filestatus.IsValid())
		Analyze();
	return TRUE;
}
开发者ID:treejames,项目名称:thhyl,代码行数:29,代码来源:thhylDlg.cpp

示例7: _T

void CThhylDlg::OnEditcomment() 
{
	// TODO: Add your control notification handler code here
	if (!(m_bTHX && m_filestatus.IsValid())) {
		const HWND hRpyFile = ((CButton*)GetDlgItem(IDC_RPYFILE))->GetSafeHwnd();
		LPCTSTR const msgtitle = _T("无法编辑注释。可能的原因:");
		LPCTSTR const msg = _T("1. 红魔乡和妖妖梦的录像文件无法添加注释;\n")
							_T("2. 尚未打开任何文件或文件格式不支持。");
		const HICON icon = AfxGetApp()->LoadIcon(MAKEINTRESOURCE(IDR_MAINFRAME));

		if (!ShowBalloonMsg( hRpyFile, msg, msgtitle, TTI_WARNING, FALSE, icon)) {
			// 如果 balloon 不支持,则显示 msgbox
			UserIconedMsgBox(msg, 0, MB_ICONEXCLAMATION, msgtitle);
		}
	}
	else {
		CDlgComment dlg;
		dlg.m_pCommentData = &m_strCurrComment;
		dlg.m_filename = m_rpyfile;
		dlg.m_pRpyData = m_pRpyData;
		dlg.m_dwRpySize = m_dwRpySize;
		if (dlg.DoModal()==IDOK)
			Analyze();
		
		cfg.CommentCodeForEdit = dlg.m_CommentCodeEdit;
	}
}
开发者ID:treejames,项目名称:thhyl,代码行数:27,代码来源:thhylDlg.cpp

示例8: Analyze

void CThhylDlg::OnOption() 
{
	// TODO: Add your control notification handler code here
	CDlgOption dlg;
	if (IDOK == dlg.DoModal() && m_filestatus.IsValid())
		Analyze();
}
开发者ID:treejames,项目名称:thhyl,代码行数:7,代码来源:thhylDlg.cpp

示例9: filter

void CThhylDlg::CopyOrMoveRpy(LPCTSTR DialogTitle, BOOL bCopy)
{
	if (!m_filestatus.IsValid())
		return;
	
	CString filter((LPCTSTR)IDS_DLGFILTER), newfilename;
	
	CFileDialogWZ dlg(FALSE, _T("rpy"), m_rpyfile,
		OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT | OFN_PATHMUSTEXIST,
		filter, this);
	dlg.m_ofn.lpstrTitle=DialogTitle;
	if (dlg.DoModal()==IDCANCEL)
		return;
	
	newfilename=dlg.GetPathName();
	
	BOOL result;
	result = bCopy
		? CopyFile(m_rpyfile, newfilename, FALSE)
		: MoveFileEx(m_rpyfile, newfilename, MOVEFILE_COPY_ALLOWED | MOVEFILE_REPLACE_EXISTING | MOVEFILE_WRITE_THROUGH);

	if (result) { //复制/移动成功
		//如果是移动,或者在选项中选中了“打开复制后的目标文件”
		if (!bCopy || HasConfigOption(CFG_COPYOPENDEST)) {
			m_rpyfile = newfilename;
			Analyze();
		}
	}
	else {
		LPCTSTR ErrorMsg;
		ErrorMsg = GetErrorMessage(GetLastError());
		MessageBox( ErrorMsg, DialogTitle, MB_ICONSTOP );
	}
}
开发者ID:treejames,项目名称:thhyl,代码行数:34,代码来源:thhylDlg.cpp

示例10: GetFieldBinary

int CAPETag::GetFieldBinary(const str_utf16 * pFieldName, void * pBuffer, int * pBufferBytes)
{
    if (m_bAnalyzed == FALSE) { Analyze(); }
    
    int nRetVal = ERROR_UNDEFINED;

    if (*pBufferBytes > 0)
    {
        CAPETagField * pAPETagField = GetTagField(pFieldName);
        if (pAPETagField == NULL)
        {
            memset(pBuffer, 0, *pBufferBytes);
            *pBufferBytes = 0;
        }
        else
        {
            if (pAPETagField->GetFieldValueSize() > *pBufferBytes)
            {
                // we'll fail here, because partial data may be worse than no data
                memset(pBuffer, 0, *pBufferBytes);
                *pBufferBytes = pAPETagField->GetFieldValueSize();
            }
            else
            {
                // memcpy
                *pBufferBytes = pAPETagField->GetFieldValueSize();
                memcpy(pBuffer, pAPETagField->GetFieldValue(), *pBufferBytes);
                nRetVal = ERROR_SUCCESS;
            }
        }
    }

    return nRetVal;
}
开发者ID:ariasrodolfo,项目名称:monkeys-audio,代码行数:34,代码来源:APETag.cpp

示例11: UpdateData

void CThhylDlg::OnDropFiles(HDROP hDropInfo) 
{
	// TODO: Add your message handler code here and/or call default
	const UINT nFileCount = ::DragQueryFile(hDropInfo, 0xFFFFFFFF, NULL, _MAX_PATH);
	LPTSTR const lpszFileName = new TCHAR[_MAX_PATH];

	for (UINT i=0; i<nFileCount; ++i) {
		::DragQueryFile(hDropInfo, i, lpszFileName,_MAX_PATH);

		if (i==0) { // 第1个文件
			UpdateData(TRUE);
			m_rpyfile = lpszFileName;
			ConvToFullPath();
			UpdateData(FALSE);
		} else //如果拖入了2个或2个以上的文件,则另开一个自身的实例来打开。
			SpawnInstance(lpszFileName);
	}
		
	::DragFinish(hDropInfo);
	delete []lpszFileName;
	
	if (nFileCount > 0) Analyze();

	//CDlgBaseWZ::OnDropFiles(hDropInfo);
}
开发者ID:treejames,项目名称:thhyl,代码行数:25,代码来源:thhylDlg.cpp

示例12: CheckIP138

void Detection::WorkFunc()
{
    CheckIP138();
    CheckIP();
    TestTinydrag();
    Ping();
    GetLocalIP();
    Test9KAPPPAC();
    Test9K();
    Test8888();
    boost::thread work_thread(boost::bind(&Detection::TestTracker, this));
    for (int i = 0; i < 5 * 60; ++i)
    {
        if (i % 3 == 0)
        {
            ++m_progress_pos_;
            if (i % 60 == 0)
            {
                Test9K();
            }
        }
        Sleep(1000);
    }
    Analyze();
    TestBs();
    Test9K();
    WriteTrackerResult();
    Sleep(1000);
    MessageBox("测试完毕!");
}
开发者ID:huangyt,项目名称:MyProjects,代码行数:30,代码来源:Detection.cpp

示例13: iter

double EffectTruncSilence::CalcPreviewInputLength(double /* previewLength */)
{
   double inputLength = mT1 - mT0;
   double minInputLength = inputLength;

   // Master list of silent regions
   RegionList silences;

   // Start with the whole selection silent
   silences.push_back(Region(mT0, mT1));

   SelectedTrackListOfKindIterator iter(Track::Wave, mTracks);
   int whichTrack = 0;

   for (Track *t = iter.First(); t; t = iter.Next()) {
      WaveTrack *const wt = static_cast<WaveTrack *>(t);

      RegionList trackSilences;

      sampleCount index = wt->TimeToLongSamples(mT0);
      sampleCount silentFrame = 0; // length of the current silence

      Analyze(silences, trackSilences, wt, &silentFrame, &index, whichTrack, &inputLength, &minInputLength);

      whichTrack++;
   }
   return inputLength;
}
开发者ID:jengelh,项目名称:audacity,代码行数:28,代码来源:TruncSilence.cpp

示例14: ClearTerrainAnalysis

void Terrain::IncTerrainAnalysis( void )
{
	m_reevaluateAnalysis = true;
	m_analysis = (TerrainAnalysisType)((int)m_analysis + 1);
	if(TerrainAnalysis_Count == g_terrain.m_analysis) { g_terrain.m_analysis = TerrainAnalysis_None; }
	ClearTerrainAnalysis();
	Analyze();
}
开发者ID:cs580project,项目名称:RL,代码行数:8,代码来源:terrain.cpp

示例15: Analyze

void IndexTuner::IndexTuneHelper(storage::DataTable* table) {

  // Add required indices
  Analyze(table);

  // Build desired indices
  BuildIndices(table);
}
开发者ID:eric-haibin-lin,项目名称:peloton-1,代码行数:8,代码来源:index_tuner.cpp


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