Commit a9ecd155 authored by Ivan Donchevskiy's avatar Ivan Donchevskiy

Some private members changed to protected in CycleStorage

parent 9bcba674
......@@ -119,10 +119,13 @@ class CycleStorage
void* ViewRow(int num, void* str);
bool ExportToXML(const char* name);
int GetIter(void);
private:
protected:
FILE *file;
int size,seekpos, inf_size,iter;
int head,tail,full_size;
int inf_size;
int head,tail;
private:
int size,seekpos, iter;
int full_size;
void filewrite(CycleStorageElem* jrn,int seek, bool needflush=true);
void* ValPointer(void* pnt);
};
......
......@@ -350,7 +350,7 @@ bool CycleStorage::DelAllRows()
void* CycleStorage::ViewRow(int num, void* str)
{
int j=(head+num)%size;
if((file==NULL)||(num>size)) return false;
if((file==NULL)||(num>size)) return 0;
CycleStorageElem *jrn = (CycleStorageElem*)new char[full_size];
fseek(file,seekpos+j*full_size,0);
fread(jrn,full_size,1,file);
......
......@@ -298,8 +298,6 @@ bool TableBlockStorage::DelRow(void* key)
{
mem[i]->count=++max;
memset(KeyPointer(i),0,k_size);
//for(int k=0;k<k_size;k++)
// *((char*)KeyPointer(i)+k)=0;
filewrite(i);
return true;
}
......@@ -323,3 +321,8 @@ void* TableBlockStorage::FindKeyValue(void* key, void* val)
return false;
}
int TableBlockStorage::GetCurBlock()
{
return cur_block;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment