/// Private constructor TPgBlob::TPgBlob(const TStr& _FNm, const TFAccess& _Access, const uint64& CacheSize) { EAssertR(CacheSize >= PG_PAGE_SIZE, "Invalid cache size for TPgBlob."); FNm = _FNm; Access = _Access; switch (Access) { case faCreate: TFile::DelWc(FNm + ".*"); SaveMain(); break; case faRdOnly: case faUpdate: LoadMain(); break; default: FailR("Unsupported TFAccess flag for TPgBlob."); } // init cache LastExtentCnt = PG_EXTENT_PCOUNT; // this means the "last" extent is full, so use new one MxLoadedPages = CacheSize / PG_PAGE_SIZE; LruFirst = LruLast = -1; }
bool VGMMiscFile::Load() { if (!LoadMain()) return false; if (unLength == 0) return false; LoadLocalData(); UseLocalData(); pRoot->AddVGMFile(this); return true; }
void PageActions::LoadLayout(const PageLayout &layout) { if (!layout.valid) return; DisablePan(); LoadInfoBoxes(layout.infobox_config); LoadBottom(layout.bottom); LoadMain(layout.main); ActionInterface::UpdateDisplayMode(); ActionInterface::SendUIState(); }