⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cache.h

📁 在n维空间(每维范围为0-1)内对插入的数值根据坐标进行分区。从一个没有分区的空间开始插入
💻 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 + -