Scid
4.7.0
Main Page
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
x
y
z
Variables
Typedefs
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
y
~
+
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
~
+
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
v
w
y
Typedefs
Enumerations
Enumerator
Related Functions
+
Files
File List
+
File Members
+
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
+
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
w
y
z
+
Typedefs
b
c
d
e
f
g
i
l
m
n
p
r
s
u
v
Enumerations
+
Enumerator
c
e
f
g
n
p
s
t
+
Macros
a
b
d
e
g
h
l
m
p
s
t
u
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
src
filter.h
Go to the documentation of this file.
1
//////////////////////////////////////////////////////////////////////
2
//
3
// FILE: filter.h
4
// Filter and CompressedFilter Classes
5
//
6
// Part of: Scid (Shane's Chess Information Database)
7
// Version: 1.4
8
//
9
// Notice: Copyright (c) 2000 Shane Hudson. All rights reserved.
10
//
11
// Author: Shane Hudson (sgh@users.sourceforge.net)
12
//
13
//////////////////////////////////////////////////////////////////////
14
15
16
#ifndef SCID_FILTER_H
17
#define SCID_FILTER_H
18
19
#include "
common.h
"
20
21
22
//////////////////////////////////////////////////////////////////////
23
//
24
// CompressedFilter class:
25
// Holds the same data as a filter, in compressed format.
26
// Random access to individual values is not possible.
27
// A CompressedFilter is created from, or restored to, a regular
28
// filter with the methods CompressFrom() and UncompressTo().
29
class
CompressedFilter
30
{
31
private
:
32
33
uint
CFilterSize;
34
uint
CFilterCount;
35
uint
CompressedLength;
36
byte
* CompressedData;
37
38
public
:
39
CompressedFilter
(
void
) { Init(); }
40
~CompressedFilter
(
void
) {
41
if
(CompressedData != NULL)
delete
[] CompressedData;
42
}
43
44
inline
void
Clear
();
45
46
uint
Size
()
const
{
return
CFilterSize; }
47
uint
Count
() {
return
CFilterCount; }
48
49
errorT
Verify
(
Filter
* filter);
50
51
void
CompressFrom
(
Filter
* filter);
52
errorT
UncompressTo
(
Filter
* filter)
const
;
53
54
private
:
55
CompressedFilter
(
const
CompressedFilter
&);
56
void
operator=(
const
CompressedFilter
&);
57
58
inline
void
Init();
59
};
60
61
inline
void
62
CompressedFilter::Init ()
63
{
64
CFilterSize = 0;
65
CFilterCount = 0;
66
CompressedLength = 0;
67
CompressedData = NULL;
68
}
69
70
inline
void
71
CompressedFilter::Clear
()
72
{
73
if
(CompressedData != NULL) {
delete
[] CompressedData; }
74
Init();
75
}
76
77
78
#endif // #ifndef SCID_FILTER_H
79
80
//////////////////////////////////////////////////////////////////////
81
// EOF: filter.h
82
//////////////////////////////////////////////////////////////////////
byte
unsigned char byte
Definition:
common.h:89
CompressedFilter::~CompressedFilter
~CompressedFilter(void)
Definition:
filter.h:40
CompressedFilter::Count
uint Count()
Definition:
filter.h:47
CompressedFilter::CompressFrom
void CompressFrom(Filter *filter)
Definition:
filter.cpp:77
uint
uint32_t uint
Definition:
common.h:91
errorT
unsigned short errorT
Definition:
error.h:20
CompressedFilter::Verify
errorT Verify(Filter *filter)
Definition:
filter.cpp:47
CompressedFilter::CompressedFilter
CompressedFilter(void)
Definition:
filter.h:39
CompressedFilter::Size
uint Size() const
Definition:
filter.h:46
Filter
Definition:
hfilter.h:35
common.h
CompressedFilter
Definition:
filter.h:29
CompressedFilter::UncompressTo
errorT UncompressTo(Filter *filter) const
Definition:
filter.cpp:108
CompressedFilter::Clear
void Clear()
Definition:
filter.h:71
Generated by
1.8.13