Sha256: 44cae7e31252d805f59e8f655a6bf9aa32f07863cf81c68682a823dcb13d9ad4
Contents?: true
Size: 897 Bytes
Versions: 276
Compression:
Stored size: 897 Bytes
Contents
#ifndef REACT_H #define REACT_H struct reactor; struct cell; typedef int (*compute1) (int); typedef int (*compute2) (int, int); struct reactor *create_reactor(); // destroy_reactor should free all cells created under that reactor. void destroy_reactor(struct reactor *); struct cell *create_input_cell(struct reactor *, int initial_value); struct cell *create_compute1_cell(struct reactor *, struct cell *, compute1); struct cell *create_compute2_cell(struct reactor *, struct cell *, struct cell *, compute2); int get_cell_value(struct cell *); void set_cell_value(struct cell *, int new_value); typedef void (*callback) (void *, int); typedef int callback_id; // The callback should be called with the same void * given in add_callback. callback_id add_callback(struct cell *, void *, callback); void remove_callback(struct cell *, callback_id); #endif
Version data entries
276 entries across 276 versions & 1 rubygems