Mirai's Miscellaneous Misadventures
M26 / include / mimimi / compound-behaviors.h
1
2
3
4#ifndef MIMIMI_COMPOUND_BEHAVIORS_H
5#define MIMIMI_COMPOUND_BEHAVIORS_H
6
7struct mimimi_behavior;
8struct mimimi_allocator;
9
10struct mimimi_behavior *mimimi_compound_behavior(struct mimimi_allocator *allocator);
11void mimimi_compound(struct mimimi_behavior *compound, struct mimimi_behavior *behavior);
12void mimimi_compound_remove(struct mimimi_behavior *compound, struct mimimi_behavior *behavior);
13char mimimi_compound_empty(struct mimimi_behavior *compound);
14
15struct mimimi_behavior *mimimi_function(void *data, void (*behave)(void *data), struct mimimi_allocator *allocator);
16struct mimimi_behavior *mimimi_finalizer(void *data, void (*finish)(void *data), struct mimimi_allocator *allocator);
17
18struct mimimi_behavior *mimimi_allocator_behavior(void **data, unsigned int size, struct mimimi_allocator *allocator);
19void *mimimi_compound_allocate(struct mimimi_behavior *compound, unsigned int size, struct mimimi_allocator *allocator);
20
21struct mimimi_behavior *mimimi_choice(char *predicate, struct mimimi_behavior *nonzero, struct mimimi_behavior *zero, struct mimimi_allocator *allocator);
22
23struct mimimi_behavior *mimimi_throttle(struct mimimi_behavior *compound, struct mimimi_behavior *behavior, int time, struct mimimi_allocator *allocator);
24
25#endif