📄 cache.h
字号:
#ifndef _CACHE_H
#define _CACHE_H
#include <string>
#include <iostream>
#include <cmath>
#include "generaldef.h"
#include "qtree.h"
#include "BFile.h"
#include "utility.h"
class CacheBlock{
public:
int num_pts;
char* write_ptr;
char* cache;
string block_id;
CacheBlock();
~CacheBlock();
bool write_one_data (Entry* data);
bool read_whole_block (Entry** dataArray);
};
class Cache {
public:
string *cache_cont; // array of the indices of blocks that are in cache
CacheBlock *cacheblock; // Cache
Cache();
~Cache();
// bool write_block(Block block, string block_id);
int in_cache(string b_id);
int find_available_space();
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -