1 |
mmeineke |
675 |
#ifndef __BASS_INTERFACE_H__ |
2 |
|
|
#define __BASS_INTERFACE_H__ |
3 |
mmeineke |
377 |
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
typedef enum { MOLECULE, ATOM, BOND, BEND, TORSION, COMPONENT, |
7 |
|
|
POSITION, ASSIGNMENT, MEMBER, CONSTRAINT, ORIENTATION, |
8 |
gezelter |
957 |
ZCONSTRAINT, RIGIDBODY, BLOCK_END } event_enum; |
9 |
mmeineke |
377 |
|
10 |
|
|
|
11 |
|
|
typedef struct{ |
12 |
|
|
double x; |
13 |
|
|
double y; |
14 |
|
|
double z; |
15 |
|
|
} position_event; |
16 |
|
|
|
17 |
|
|
typedef enum { STRING, INT, DOUBLE } interface_assign_type; |
18 |
|
|
|
19 |
|
|
typedef struct{ |
20 |
|
|
interface_assign_type asmt_type; |
21 |
|
|
char lhs[80]; |
22 |
|
|
union{ |
23 |
|
|
int ival; |
24 |
|
|
double dval; |
25 |
|
|
char sval[120]; |
26 |
|
|
}rhs; |
27 |
|
|
} assignment_event; |
28 |
|
|
|
29 |
|
|
typedef struct{ |
30 |
|
|
int a; |
31 |
|
|
int b; |
32 |
|
|
int c; |
33 |
|
|
int d; |
34 |
|
|
} member_event; |
35 |
|
|
|
36 |
|
|
typedef struct{ |
37 |
|
|
event_enum event_type; |
38 |
|
|
char* err_msg; |
39 |
|
|
|
40 |
|
|
union{ |
41 |
|
|
int blk_index; // block index |
42 |
|
|
position_event pos; |
43 |
|
|
position_event ornt; // use the same structure for orientation |
44 |
|
|
assignment_event asmt; |
45 |
|
|
member_event mbr; |
46 |
|
|
double cnstr; // the constraint value |
47 |
|
|
} evt; |
48 |
|
|
} event; |
49 |
|
|
|
50 |
|
|
#ifdef __cplusplus |
51 |
|
|
extern "C" { |
52 |
|
|
#endif |
53 |
|
|
|
54 |
|
|
int event_handler( event* the_event ); |
55 |
mmeineke |
504 |
|
56 |
mmeineke |
377 |
#ifdef __cplusplus |
57 |
|
|
} |
58 |
|
|
#endif |
59 |
|
|
|
60 |
|
|
|
61 |
mmeineke |
675 |
#endif // ifndef __BASS_INTERFACE_H__ |