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

C++ ClearCache函数代码示例

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

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



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

示例1: PROFILE_THIS_SCOPE

void MipsJit::Compile(u32 em_address) {
	PROFILE_THIS_SCOPE("jitc");
	if (GetSpaceLeft() < 0x10000 || blocks.IsFull()) {
		ClearCache();
	}
	int block_num = blocks.AllocateBlock(em_address);
	JitBlock *b = blocks.GetBlock(block_num);
	DoJit(em_address, b);
	blocks.FinalizeBlock(block_num, jo.enableBlocklink);

	bool cleanSlate = false;

	if (js.hasSetRounding && !js.lastSetRounding) {
		WARN_LOG(JIT, "Detected rounding mode usage, rebuilding jit with checks");
		// Won't loop, since hasSetRounding is only ever set to 1.
		js.lastSetRounding = js.hasSetRounding;
		cleanSlate = true;
	}

	if (cleanSlate) {
		// Our assumptions are all wrong so it's clean-slate time.
		ClearCache();
		Compile(em_address);
	}
}
开发者ID:AmesianX,项目名称:ppsspp,代码行数:25,代码来源:MipsJit.cpp


示例2: NumFields

void c4_HandlerSeq::DetachFromStorage(bool full_)
{
    if (_persist != 0) {
        int limit = full_ ? 0 : NumFields();

        // get rid of all handlers which might do I/O
        for (int c = NumHandlers(); --c >= 0;) {
            c4_Handler &h = NthHandler(c);

            // all nested fields are detached recursively
            if (IsNested(c))
                for (int r = 0; r < NumRows(); ++r)
                    if (h.HasSubview(r)) {
                        SubEntry(c, r).DetachFromStorage(full_);
                    }

            if (c >= limit) {
                if (h.IsPersistent()) {
                    delete  &h;
                    _handlers.RemoveAt(c);
                    ClearCache();
                }
            }
        }

        if (full_) {
            //UnmappedAll();
            _persist = 0;
        }
    }
}
开发者ID:KDE,项目名称:kdepim,代码行数:31,代码来源:handler.cpp


示例3: __CHECK_POINTER

STDMETHODIMP CEtsDivColl::Clone(IEtsDivColl** ppVal)
{
	HRESULT hr = S_OK;
	__CHECK_POINTER(ppVal);

	try
	{
		ClearCache();
		IEtsDivCollPtr spColl;
		CComObject<CEtsDivColl>* pColl = NULL;
		_CHK(CComObject<CEtsDivColl>::CreateInstance(&pColl));
		spColl.Attach(pColl, TRUE);
		if(!m_DivColl.empty())
		{
			EnumIterType itr = m_DivColl.begin();
			while(itr!=m_DivColl.end())
			{
				pColl->m_DivColl.insert(*itr);
				++itr;
			}

		}   
		*ppVal = spColl.Detach();
	}
	catch (_com_error& e) 
	{
		hr =  Error((PTCHAR)EgLib::CComErrorWrapper::ErrorDescription(e), IID_IEtsDivColl, e.Error());
	}
	return hr;
}
开发者ID:AlexS2172,项目名称:IVRMstandard,代码行数:30,代码来源:EtsDivColl.cpp


示例4: SetPen

void ImgCell::Draw(CellParser& parser, wxPoint point, int fontsize)
{
  wxDC& dc = parser.GetDC();

  if (DrawThisCell(parser, point) && m_image != NULL)
  {
    wxMemoryDC bitmapDC;
    double scale = parser.GetScale();
    m_image->ViewportSize(m_canvasSize.x,m_canvasSize.y,scale);
  
    m_height = (m_image->m_height) + 2 * m_imageBorderWidth;
    m_width  = (m_image->m_width)  + 2 * m_imageBorderWidth;

    SetPen(parser);
    if (m_drawRectangle)
      
      dc.DrawRectangle(wxRect(point.x, point.y - m_center, m_width, m_height));  

    wxBitmap bitmap = m_image->GetBitmap();
    bitmapDC.SelectObject(bitmap);
      
    dc.Blit(point.x + m_imageBorderWidth, point.y - m_center + m_imageBorderWidth, m_width - 2 * m_imageBorderWidth, m_height - 2 * m_imageBorderWidth, &bitmapDC, 0, 0);
  }
  else
    // The cell isn't drawn => No need to keep it's image cache for now.
    ClearCache();

  MathCell::Draw(parser, point, fontsize);
}
开发者ID:Kahkonen,项目名称:wxmaxima,代码行数:29,代码来源:ImgCell.cpp


示例5: StopTimer

void SlideShow::MarkAsDeleted()
{
  // Stop and unregister the timer.
  StopTimer();
  ClearCache();
  Cell::MarkAsDeleted();
}
开发者ID:yurchor,项目名称:wxmaxima,代码行数:7,代码来源:SlideShowCell.cpp


示例6: DetachFromParent

c4_HandlerSeq::~c4_HandlerSeq()
{
    const bool rootLevel = _parent == this;
    c4_Persist *pers = _persist;

    if (rootLevel && pers != 0) {
        pers->DoAutoCommit();
    }

    DetachFromParent();
    DetachFromStorage(true);

    for (int i = 0; i < NumHandlers(); ++i) {
        delete  &NthHandler(i);
    }
    _handlers.SetSize(0);

    ClearCache();

    if (rootLevel) {
        delete _field;

        d4_assert(pers != 0);
        delete pers;
    }
}
开发者ID:KDE,项目名称:kdepim,代码行数:26,代码来源:handler.cpp


示例7: ClearCache

ChEXPORT SsrwOOCacheStream::SsrwOOCacheStream(Stream* in_pStream)
{
    ChLOG_DEBUG_START_FN;
    m_pStream = in_pStream;
    m_pStringTmp = NULL;
	ClearCache();
}
开发者ID:killbug2004,项目名称:WSProf,代码行数:7,代码来源:SsrwOOCacheStream.cpp


示例8: ClearCache

BoxBrowser::~BoxBrowser()
{
	for( int i = 0; i < NUM_BOXES; i++ )
	{
		delete box[ i ];
	}

	delete gameText;
//	delete zIdTxt;
	delete noCoverdata;

	ClearCache();

	if( bgImg1 )
		delete bgImg1;

	if( bgImg2 )
		delete bgImg2;

//	if( ratingImg )
//		delete ratingImg;

//	if( ratingImgData )
//		delete ratingImgData;
}
开发者ID:giantpune,项目名称:libps3gui,代码行数:25,代码来源:boxbrowser.cpp


示例9: if

//shifts the image datas to a different box and shifts the index
void BoxBrowser::Shift( int num )
{
	//shift list index
	listIdx -= num;
	if( listIdx >= GameList::Count() )
	{
		listIdx = 0;
	}
	else if( listIdx < 0 )
	{
		listIdx = GameList::Count() - 1;
	}

	// check cache size
	// probably could be more elegant than this, but this should work for now
	if( coverImg.size() + abs(num) > BB_MAX_CACHE )
		ClearCache( false );

	//assign new image to boxes
	int lOff = ( NUM_BOXES / 2 );
	for( int i = 0; i < NUM_BOXES; i++ )
	{
		u32 cvrIdx = ( ( ( listIdx ) + i ) % GameList::Count() );
		box[ i ]->SetImage( Get( cvrIdx ) );

		if( i == lOff )
		{
			//set title text
			currentSelection = cvrIdx;
			gameText->SetText( GameList::Name( currentSelection ).c_str() );
		}
	}
	//RsxMem::PrintInfo( true );
}
开发者ID:giantpune,项目名称:libps3gui,代码行数:35,代码来源:boxbrowser.cpp


示例10: _T

const FileStatusCacheEntry * GitFolderStatus::GetCachedItem(const CTGitPath& filepath)
{
	sCacheKey.assign(filepath.GetWinPath());
	FileStatusMap::const_iterator iter;
	const FileStatusCacheEntry *retVal;

	if(m_mostRecentPath.IsEquivalentTo(CTGitPath(sCacheKey.c_str())))
	{
		// We've hit the same result as we were asked for last time
		CTraceToOutputDebugString::Instance()(_T(__FUNCTION__) _T(": fast cache hit for %s\n"), filepath.GetWinPath());
		retVal = m_mostRecentStatus;
	}
	else if ((iter = m_cache.find(sCacheKey)) != m_cache.end())
	{
		CTraceToOutputDebugString::Instance()(_T(__FUNCTION__) _T(": cache found for %s\n"), filepath.GetWinPath());
		retVal = &iter->second;
		m_mostRecentStatus = retVal;
		m_mostRecentPath = CTGitPath(sCacheKey.c_str());
	}
	else
	{
		retVal = NULL;
	}

	if(retVal != NULL)
	{
		// We found something in a cache - check that the cache is not timed-out or force-invalidated
		DWORD now = GetTickCount();

		if ((now >= m_TimeStamp)&&((now - m_TimeStamp) > GetTimeoutValue()))
		{
			// Cache is timed-out
			CTraceToOutputDebugString::Instance()(__FUNCTION__ ": Cache timed-out\n");
			ClearCache();
			retVal = NULL;
		}
		else if(WaitForSingleObject(m_hInvalidationEvent, 0) == WAIT_OBJECT_0)
		{
			// TortoiseGitProc has just done something which has invalidated the cache
			CTraceToOutputDebugString::Instance()(__FUNCTION__ ": Cache invalidated\n");
			ClearCache();
			retVal = NULL;
		}
		return retVal;
	}
	return NULL;
}
开发者ID:konlytest,项目名称:TortoiseGit,代码行数:47,代码来源:GitFolderStatus.cpp


示例11: ReloadTimer

void SlideShow::Draw(wxPoint point)
{
  Cell::Draw(point);
  // If the animation leaves the screen the timer is stopped automatically.
  if(m_animationRunning)
    ReloadTimer();
  
  if (DrawThisCell(point) && (m_images[m_displayed] != NULL))
  {
    // Start the timer once the animation appears on the screen.
    // But start it only once: Else the animation could be refreshed
    // more frequent than it can be drawn. Each update of the animation
    // will trigger this function and will trigger the animation to be
    // restarted anyway.
    //
    Configuration *configuration = (*m_configuration);
    if(configuration->GetPrinting()) {
        m_images[m_displayed]->Recalculate(configuration->GetZoomFactor() * PRINT_SIZE_MULTIPLIER);
    } else {
      m_images[m_displayed]->Recalculate();
    }
    
    if (!InUpdateRegion()) return;
    
    wxDC *dc = configuration->GetDC();
    wxMemoryDC bitmapDC;

    // Slide show cells have a red border except if they are selected
    if (m_drawBoundingBox)
      dc->SetPen(*(wxThePenList->FindOrCreatePen(configuration->GetColor(TS_SELECTION))));
    else
      dc->SetPen(*wxRED_PEN);

    dc->DrawRectangle(wxRect(point.x, point.y - m_center, m_width, m_height));

    wxBitmap bitmap = (configuration->GetPrinting() ? m_images[m_displayed]->GetBitmap(configuration->GetZoomFactor() * PRINT_SIZE_MULTIPLIER) : m_images[m_displayed]->GetBitmap());
    bitmapDC.SelectObject(bitmap);

    int imageBorderWidth = m_imageBorderWidth;
    if (m_drawBoundingBox)
    {
      imageBorderWidth = Scale_Px(3);
      dc->SetBrush(*(wxTheBrushList->FindOrCreateBrush(configuration->GetColor(TS_SELECTION))));
      dc->DrawRectangle(wxRect(point.x, point.y - m_center, m_width, m_height));
    }

    dc->Blit(point.x + imageBorderWidth, point.y - m_center + imageBorderWidth,
             m_width - 2 * imageBorderWidth, m_height - 2 * imageBorderWidth,
             &bitmapDC,
             imageBorderWidth - m_imageBorderWidth, imageBorderWidth - m_imageBorderWidth);

  }
  else
    // The cell isn't drawn => No need to keep it's image cache for now.
    ClearCache();

  // If we need a selection border on another redraw we will be informed by OnPaint() again.
  m_drawBoundingBox = false;
}
开发者ID:yurchor,项目名称:wxmaxima,代码行数:59,代码来源:SlideShowCell.cpp


示例12: SaveCache

void MEmblemMgr::Destroy()
{
	if (CheckSaveFlag())
		SaveCache();

	ClearCache();
	m_HttpSpooler.Destroy();
}
开发者ID:Asunaya,项目名称:RefinedGunz,代码行数:8,代码来源:MEmblemMgr.cpp


示例13: SaveCache

ProfileManager::~ProfileManager()
{
    // If the profiles have been altered then write out the profile file
    if (Changed)
        SaveCache();

    ClearCache();
}
开发者ID:123woodman,项目名称:minko,代码行数:8,代码来源:OVR_Profile.cpp


示例14: ClearCache

EXPORT_C void  CHuiFxEngine::SetMemoryLevel(THuiMemoryLevel aLevel)
    {
    iLowGraphicsMemoryMode = aLevel;
    if(iLowGraphicsMemoryMode < EHuiMemoryLevelReduced)
        {
        ClearCache();
        }
    }
开发者ID:cdaffara,项目名称:symbiandump-mw4,代码行数:8,代码来源:HuiFxEngine.cpp


示例15: DrawSceneToWindowWithTransition

	void Core_Imp::DrawSceneToWindowWithTransition(CoreScene* nextScene, CoreScene* previousScene, CoreTransition* transition)
	{
		auto t = (CoreTransition_Imp*) transition;

		m_graphics->SetRenderTarget(nullptr, nullptr);

		t->DrawCache(layerRenderer, nextScene, previousScene);
		t->ClearCache();
	}
开发者ID:Pctg-x8,项目名称:Altseed,代码行数:9,代码来源:asd.Core_Imp.cpp


示例16: d4_assert

c4_Sequence::~c4_Sequence() {
  d4_assert(_refCount == 0);

  d4_assert(!_dependencies); // there can be no dependencies left

  ClearCache();

  delete _tempBuf;
}
开发者ID:OpenSourceInternetV2,项目名称:mettanode,代码行数:9,代码来源:viewx.cpp


示例17: ClearCache

void LexicalReorderingTableTree::InitializeForInput(const InputType& input){
  ClearCache();
  if(ConfusionNet const* cn = dynamic_cast<ConfusionNet const*>(&input)){
    Cache(*cn);
  } else if(Sentence const* s = dynamic_cast<Sentence const*>(&input)){
    // Cache(*s); ... this just takes up too much memory, we cache elsewhere
    DisableCache();
  }
};
开发者ID:awildfox,项目名称:moses,代码行数:9,代码来源:LexicalReorderingTable.cpp


示例18: ConvertRect

bool
TopographyFile::Update(const WindowProjection &map_projection)
{
  if (IsEmpty())
    return false;

  if (map_projection.GetMapScale() > scale_threshold)
    /* not visible, don't update cache now */
    return false;

  const GeoBounds screenRect =
    map_projection.GetScreenBounds();
  if (cache_bounds.IsValid() && cache_bounds.IsInside(screenRect))
    /* the cache is still fresh */
    return false;

  cache_bounds = map_projection.GetScreenBounds().Scale(fixed(2));

  rectObj deg_bounds = ConvertRect(cache_bounds);

  // Test which shapes are inside the given bounds and save the
  // status to file.status
  msShapefileWhichShapes(&file, dir, deg_bounds, 0);

  // If not a single shape is inside the bounds
  if (!file.status) {
    // ... clear the whole buffer
    ClearCache();
    return false;
  }

  // Iterate through the shapefile entries
  const ShapeList **current = &first;
  auto it = shapes.begin();
  for (int i = 0; i < file.numshapes; ++i, ++it) {
    if (!msGetBit(file.status, i)) {
      // If the shape is outside the bounds
      // delete the shape from the cache
      delete it->shape;
      it->shape = NULL;
    } else {
      // is inside the bounds
      if (it->shape == NULL)
        // shape isn't cached yet -> cache the shape
        it->shape = new XShape(&file, i, label_field);
      // update list pointer
      *current = it;
      current = &it->next;
    }
  }
  // end of list marker
  *current = NULL;

  ++serial;
  return true;
}
开发者ID:j-konopka,项目名称:XCSoar-TE,代码行数:56,代码来源:TopographyFile.cpp


示例19: ClearCache

void cImage::Allocate( const Uint32& size, eeColorA DefaultColor, bool memsetData ) {
	ClearCache();

	mPixels = eeNewArray( unsigned char, size );
	mSize 	= size;

	if ( memsetData ) {
		memset( mPixels, (int)DefaultColor.GetValue(), size );
	}
}
开发者ID:dogtwelve,项目名称:eepp,代码行数:10,代码来源:cimage.cpp


示例20: ClearCache

NS_IMETHODIMP nsXULTreeAccessible::Shutdown()
{
  nsXULSelectableAccessible::Shutdown();

  if (mAccessNodeCache) {
    ClearCache(*mAccessNodeCache);
    delete mAccessNodeCache;
    mAccessNodeCache = nsnull;
  }
  return NS_OK;
}
开发者ID:mmadia,项目名称:bezilla,代码行数:11,代码来源:nsXULTreeAccessible.cpp



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ ClearCharmInfoFlags函数代码示例发布时间:2022-05-30
下一篇:
C++ ClearBuffer函数代码示例发布时间: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