repo.or.cz
/
vspell.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
fix minitoc/heading error
[vspell.git]
/
libvspell
/
cgen.h
blob
4e0d5d6855f3c12b6758f80b5322f7b24a86181f
1
// -*- tab-width: 2 mode: c++ -*-
2
3
#ifndef __CGEN_H__
4
#define __CGEN_H__
5
6
#ifndef __SPELL_H__
7
#include
"spell.h"
8
#endif
9
10
#ifndef __VECTOR__
11
#include <vector>
12
#endif
13
14
/**
15
Combination Generator.
16
It is used to generate combinations ;)
17
*/
18
19
20
class
CGen
21
{
22
private
:
23
std
::
vector
<
uint
>
limit
,
iter
;
24
int
nr_limit
,
cur
;
25
26
public
:
27
void
init
(
const
std
::
vector
<
uint
> &
limit
);
28
bool
step
(
std
::
vector
<
uint
> &
pos
);
29
void
done
();
30
};
31
32
#endif