ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-4/src/io/node_list.h
Revision: 1683
Committed: Thu Oct 28 22:34:02 2004 UTC (19 years, 8 months ago)
Content type: text/plain
File size: 2082 byte(s)
Log Message:
This commit was manufactured by cvs2svn to create branch 'new_design'.

File Contents

# Content
1 #ifndef __NODE_LIST_H__
2 #define __NODE_LIST_H__
3
4 /* enumerates the different types of nodes the statments can be */
5
6 typedef enum { GLOBAL_HEAD, COMPONENT_HEAD,
7 MOLECULE_HEAD, ATOM_HEAD, BOND_HEAD, BEND_HEAD, TORSION_HEAD,
8 MEMBERS_STMT, CONSTRAINT_STMT, ASSIGNMENT_STMT, POSITION_STMT,
9 ORIENTATION_STMT, ZCONSTRAINT_HEAD,
10 RIGIDBODY_HEAD, CUTOFFGROUP_HEAD } node_type;
11
12 /* a structure to hold the index of the members of a bond, bend, or torsion */
13
14 typedef struct members_data_tag{
15 int nMembers;
16 int* memberList;
17 } members_data;
18
19 /* a structure to hold constraint information */
20
21 typedef struct constraint_data_tag{
22 double constraint_val;
23 } constraint_data;
24
25 /* a structure to hold assignment info */
26
27 typedef enum{ STR_ASSN, INT_ASSN, DOUBLE_ASSN } assign_type;
28
29 typedef union{
30 int i_val;
31 double d_val;
32 char* str_ptr;
33 } assignment_value;
34
35 typedef struct assignment_data_tag{
36 assign_type type;
37 char* identifier; // left hand side
38 assignment_value rhs; // right hand side
39 } assignment_data;
40
41 /* a structure to hold the position information */
42
43 typedef struct position_data_tag{
44 double x;
45 double y;
46 double z;
47 } position_data;
48
49 /* a structure to hold the orientation information */
50
51 typedef struct orientation_data_tag{
52 double phi;
53 double theta;
54 double psi;
55 } orientation_data;
56
57 /* here's the master node type. This is the node that will be strung
58 together by the yacc parser. Each statement will an individual
59 node. Block statements will act as branch nodes, pointing to their
60 own set of statement lists.*/
61
62 typedef struct node_tag{
63 node_type type;
64 int index; // needed for atoms, bonds, etc.
65 struct node_tag* next_stmt; // the next statement
66 struct node_tag* prev_stmt; // the previous statement
67 struct node_tag* stmt_list; // the statment list if this is a block.
68
69 /* this is a union to hold the statement data */
70
71 union{
72 members_data mbrs;
73 constraint_data cnstr;
74 assignment_data asmt;
75 position_data pos;
76 orientation_data ort;
77 } the_data;
78
79 } node;
80
81
82
83 #endif