您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ ClearCache函数代码示例

51自学网 2021-06-01 20:11:11
  C++
这篇教程C++ ClearCache函数代码示例写得很实用,希望能帮到您。

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

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


示例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,


示例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,


示例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,


示例5: StopTimer

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


示例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,


示例7: ClearCache

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


示例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,


示例9: if

//shifts the image datas to a different box and shifts the indexvoid 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,


示例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,


示例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,


示例12: SaveCache

void MEmblemMgr::Destroy(){	if (CheckSaveFlag())		SaveCache();	ClearCache();	m_HttpSpooler.Destroy();}
开发者ID:Asunaya,项目名称:RefinedGunz,代码行数:8,


示例13: SaveCache

ProfileManager::~ProfileManager(){    // If the profiles have been altered then write out the profile file    if (Changed)        SaveCache();    ClearCache();}
开发者ID:123woodman,项目名称:minko,代码行数:8,


示例14: ClearCache

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


示例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,


示例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,


示例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,


示例18: ConvertRect

boolTopographyFile::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,


示例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,


示例20: ClearCache

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


示例21: I_Error

void *Z_Malloc(int size, int tag, void *user){    memblock_t *newblock;    unsigned char *data;    void *result;    if (tag < 0 || tag >= PU_NUM_TAGS || tag == PU_FREE)    {        I_Error("Z_Malloc: attempted to allocate a block with an invalid "                "tag: %i", tag);    }    if (user == NULL && tag >= PU_PURGELEVEL)    {        I_Error ("Z_Malloc: an owner is required for purgable blocks");    }    // Malloc a block of the required size        newblock = NULL;    while (newblock == NULL)    {        newblock = (memblock_t *) malloc(sizeof(memblock_t) + size);        if (newblock == NULL)        {            if (!ClearCache(sizeof(memblock_t) + size))            {                I_Error("Z_Malloc: failed on allocation of %i bytes", size);            }        }    }    newblock->tag = tag;        // Hook into the linked list for this tag type    newblock->id = ZONEID;    newblock->user = user;    newblock->size = size;    Z_InsertBlock(newblock);    data = (unsigned char *) newblock;    result = data + sizeof(memblock_t);    if (user != NULL)    {        *newblock->user = result;    }        return result;}
开发者ID:Clever-Boy,项目名称:chocolate-doom,代码行数:54,


示例22: ClearCache

	SpriteRenderer3D::~SpriteRenderer3D()	{		ClearCache();		m_vertexBuffer.reset();		m_indexBuffer.reset();		m_shader_nt.reset();		m_shader.reset();		SafeRelease(m_graphics);	}
开发者ID:altseed,项目名称:Altseed,代码行数:11,


示例23: ClearCache

void Jit::Compile(u32 em_address){	if (GetSpaceLeft() < 0x10000 || blocks.IsFull())	{		ClearCache();	}	int block_num = blocks.AllocateBlock(em_address);	JitBlock *b = blocks.GetBlock(block_num);	blocks.FinalizeBlock(block_num, jo.enableBlocklink, DoJit(em_address, b));}
开发者ID:ChrisAldama,项目名称:ppsspp,代码行数:11,


示例24: ClearCache

TopographyFile::~TopographyFile(){  if (IsEmpty())    return;  ClearCache();  msShapefileClose(&file);  if (dir != NULL) {    --dir->refcount;    zzip_dir_free(dir);  }}
开发者ID:j-konopka,项目名称:XCSoar-TE,代码行数:13,


示例25: CHECK_CLANG_ENABLED_RET

void ClangCodeCompletion::OnBuildEnded(clBuildEvent& e){    e.Skip();    CHECK_CLANG_ENABLED_RET();    // Clear environment variables previously set by this class    ::wxUnsetEnv("CL_COMPILATION_DB");    ::wxUnsetEnv("CXX");    ::wxUnsetEnv("CC");    // Clear the TU cache    ClearCache();}
开发者ID:ecmadrid,项目名称:codelite,代码行数:13,


示例26: ClearCache

void Jit::Compile(u32 em_address){	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);	// Drat.  The VFPU hit an uneaten prefix at the end of a block.	if (js.startDefaultPrefix && js.MayHavePrefix()) {		WARN_LOG(JIT, "Uneaten prefix at end of block: %08x", js.compilerPC - 4);		js.startDefaultPrefix = false;		// Our assumptions are all wrong so it's clean-slate time.		ClearCache();		// Let's try that one more time.  We won't get back here because we toggled the value.		Compile(em_address);	}}
开发者ID:ToadKing,项目名称:ppsspp,代码行数:23,



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


C++ ClearCharmInfoFlags函数代码示例
C++ ClearBuffer函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。