summaryrefslogtreecommitdiff
path: root/src/runtime/c/gu/choice.h
blob: 976bdce47e6828b7e9528fdc35f618d602bb3793 (plain)
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
29
30
31
32
33
34
35
36
37
#ifndef GU_CHOICE_H_
#define GU_CHOICE_H_

#include <gu/mem.h>

typedef struct GuChoice GuChoice;

typedef struct GuChoiceMark GuChoiceMark;

GU_API_DECL GuChoice*
gu_new_choice(GuPool* pool);

GU_API_DECL int
gu_choice_next(GuChoice* ch, int n_choices);

GU_API_DECL GuChoiceMark
gu_choice_mark(GuChoice* ch);

GU_API_DECL void
gu_choice_reset(GuChoice* ch, GuChoiceMark mark);

GU_API_DECL bool
gu_choice_advance(GuChoice* ch);


// private

struct GuChoiceMark {
	size_t path_idx;
};






#endif // GU_CHOICE_H_