forked from pytries/DAWG
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_completer.pxd
28 lines (22 loc) · 852 Bytes
/
_completer.pxd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from _base_types cimport BaseType, SizeType, ValueType
from _dawg cimport Dawg
from _dictionary cimport Dictionary
from _guide cimport Guide
cdef extern from "../lib/dawgdic/completer.h" namespace "dawgdic" nogil:
cdef cppclass Completer:
Completer()
Completer(Dictionary &dic, Guide &guide)
void set_dic(Dictionary &dic)
void set_guide(Guide &guide)
Dictionary &dic()
Guide &guide()
# These member functions are available only when Next() returns true.
char *key()
SizeType length()
ValueType value()
# Starts completing keys from given index and prefix.
void Start(BaseType index)
void Start(BaseType index, char *prefix)
void Start(BaseType index, char *prefix, SizeType length)
# Gets the next key.
bint Next()