Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
uniset2
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
UniSet project repositories
uniset2
Commits
a9ecd155
Commit
a9ecd155
authored
Jul 28, 2009
by
Ivan Donchevskiy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some private members changed to protected in CycleStorage
parent
9bcba674
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
6 deletions
+12
-6
Storages.h
include/Storages.h
+6
-3
CycleStorage.cc
src/Various/CycleStorage.cc
+1
-1
TableBlockStorage.cc
src/Various/TableBlockStorage.cc
+5
-2
No files found.
include/Storages.h
View file @
a9ecd155
...
@@ -119,10 +119,13 @@ class CycleStorage
...
@@ -119,10 +119,13 @@ class CycleStorage
void
*
ViewRow
(
int
num
,
void
*
str
);
void
*
ViewRow
(
int
num
,
void
*
str
);
bool
ExportToXML
(
const
char
*
name
);
bool
ExportToXML
(
const
char
*
name
);
int
GetIter
(
void
);
int
GetIter
(
void
);
pr
ivate
:
pr
otected
:
FILE
*
file
;
FILE
*
file
;
int
size
,
seekpos
,
inf_size
,
iter
;
int
inf_size
;
int
head
,
tail
,
full_size
;
int
head
,
tail
;
private
:
int
size
,
seekpos
,
iter
;
int
full_size
;
void
filewrite
(
CycleStorageElem
*
jrn
,
int
seek
,
bool
needflush
=
true
);
void
filewrite
(
CycleStorageElem
*
jrn
,
int
seek
,
bool
needflush
=
true
);
void
*
ValPointer
(
void
*
pnt
);
void
*
ValPointer
(
void
*
pnt
);
};
};
...
...
src/Various/CycleStorage.cc
View file @
a9ecd155
...
@@ -350,7 +350,7 @@ bool CycleStorage::DelAllRows()
...
@@ -350,7 +350,7 @@ bool CycleStorage::DelAllRows()
void
*
CycleStorage
::
ViewRow
(
int
num
,
void
*
str
)
void
*
CycleStorage
::
ViewRow
(
int
num
,
void
*
str
)
{
{
int
j
=
(
head
+
num
)
%
size
;
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
];
CycleStorageElem
*
jrn
=
(
CycleStorageElem
*
)
new
char
[
full_size
];
fseek
(
file
,
seekpos
+
j
*
full_size
,
0
);
fseek
(
file
,
seekpos
+
j
*
full_size
,
0
);
fread
(
jrn
,
full_size
,
1
,
file
);
fread
(
jrn
,
full_size
,
1
,
file
);
...
...
src/Various/TableBlockStorage.cc
View file @
a9ecd155
...
@@ -298,8 +298,6 @@ bool TableBlockStorage::DelRow(void* key)
...
@@ -298,8 +298,6 @@ bool TableBlockStorage::DelRow(void* key)
{
{
mem
[
i
]
->
count
=++
max
;
mem
[
i
]
->
count
=++
max
;
memset
(
KeyPointer
(
i
),
0
,
k_size
);
memset
(
KeyPointer
(
i
),
0
,
k_size
);
//for(int k=0;k<k_size;k++)
// *((char*)KeyPointer(i)+k)=0;
filewrite
(
i
);
filewrite
(
i
);
return
true
;
return
true
;
}
}
...
@@ -323,3 +321,8 @@ void* TableBlockStorage::FindKeyValue(void* key, void* val)
...
@@ -323,3 +321,8 @@ void* TableBlockStorage::FindKeyValue(void* key, void* val)
return
false
;
return
false
;
}
}
int
TableBlockStorage
::
GetCurBlock
()
{
return
cur_block
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment