cache.h

来自「在n维空间(每维范围为0-1)内对插入的数值根据坐标进行分区。从一个没有分区的空」· C头文件 代码 · 共 48 行

H
48
字号
#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 + =
减小字号Ctrl + -
显示快捷键?