Mirai's Miscellaneous Misadventures
M26 / include / mimimi / compound-behaviors.h
#ifndef MIMIMI_COMPOUND_BEHAVIORS_H
#define MIMIMI_COMPOUND_BEHAVIORS_H
struct mimimi_behavior;
struct mimimi_allocator;
struct mimimi_behavior *mimimi_compound_behavior(struct mimimi_allocator *allocator);
void mimimi_compound(struct mimimi_behavior *compound, struct mimimi_behavior *behavior);
void mimimi_compound_remove(struct mimimi_behavior *compound, struct mimimi_behavior *behavior);
char mimimi_compound_empty(struct mimimi_behavior *compound);
struct mimimi_behavior *mimimi_function(void *data, void (*behave)(void *data), struct mimimi_allocator *allocator);
struct mimimi_behavior *mimimi_finalizer(void *data, void (*finish)(void *data), struct mimimi_allocator *allocator);
struct mimimi_behavior *mimimi_allocator_behavior(void **data, unsigned int size, struct mimimi_allocator *allocator);
void *mimimi_compound_allocate(struct mimimi_behavior *compound, unsigned int size, struct mimimi_allocator *allocator);
struct mimimi_behavior *mimimi_choice(char *predicate, struct mimimi_behavior *nonzero, struct mimimi_behavior *zero, struct mimimi_allocator *allocator);
struct mimimi_behavior *mimimi_throttle(struct mimimi_behavior *compound, struct mimimi_behavior *behavior, int time, struct mimimi_allocator *allocator);
#endif