Move class list handling to dedicated module (class).
[ilari-esolangs.git] / class.h
blobfd923dc79475219ac82351582d82fc6ef8d7e440
1 #ifndef _class__h__included__
2 #define _class__h__included__
4 #include <stdlib.h>
6 /* Class table entry. */
7 struct class
9 /* Class number. */
10 size_t c_class_number;
11 /* Number of fields. */
12 size_t c_fields;
13 /* Number of locals. */
14 size_t c_locals;
15 /* Body text. */
16 unsigned char* c_body;
17 /* Body text length. */
18 size_t c_body_length;
19 /* Next entry. */
20 struct class* c_next;
23 /******************************************************************************
25 * DESCRIPTION:
26 * Search for class with given number.
28 * PARAMETERS:
29 * number Number of class to search.
31 * RETURN VALUE:
32 * Class structure, or NULL if no such class exists.
34 *****************************************************************************/
35 struct class* class_search(size_t number);
37 /******************************************************************************
39 * DESCRIPTION:
40 * Register new class(es).
42 * PARAMETERS:
43 * class The class to register.
45 *****************************************************************************/
46 void class_register(struct class* class);
48 /******************************************************************************
50 * DESCRIPTION:
51 * Unregister all classes.
53 *****************************************************************************/
54 void class_unregister_all();
56 #endif