ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libBASS/BASS_interface.cpp
(Generate patch)

Comparing trunk/OOPSE/libBASS/BASS_interface.cpp (file contents):
Revision 690 by mmeineke, Tue Aug 12 21:44:06 2003 UTC vs.
Revision 998 by gezelter, Thu Jan 29 23:01:17 2004 UTC

# Line 1 | Line 1
1  
2 < #include <cstring>
3 < #include <cstdio>
4 < #include <cstdlib>
2 > #include <string.h>
3 > #include <stdio.h>
4 > #include <stdlib.h>
5  
6   #include "Globals.hpp"
7   #include "BASS_interface.h"
# Line 15 | Line 15 | typedef enum { GLOBAL_BLK, MOLECULE_BLK, ATOM_BLK, BON
15   // Globals ************************************************
16  
17   typedef enum { GLOBAL_BLK, MOLECULE_BLK, ATOM_BLK, BOND_BLK, BEND_BLK,
18 <               TORSION_BLK, COMPONENT_BLK, ZCONSTRAINT_BLK } block_type;
18 >               TORSION_BLK, COMPONENT_BLK, ZCONSTRAINT_BLK,
19 >               RIGIDBODY_BLK } block_type;
20  
21   block_type current_block = GLOBAL_BLK;
22   #define MAX_NEST 20 // the max number of nested blocks
# Line 100 | Line 101 | int event_handler( event* the_event ){
101        handled = the_stamps->newTorsion( the_event );
102        break;
103  
104 +    case RIGIDBODY:
105 +      incr_block( RIGIDBODY_BLK );
106 +      handled = the_stamps->newRigidBody( the_event );
107 +      break;
108 +
109      case ASSIGNMENT:
110        handled = the_stamps->moleculeAssign( the_event );
111        break;
# Line 112 | Line 118 | int event_handler( event* the_event ){
118      default:
119        the_event->err_msg =
120          strdup( "Not a valid molecule event\n" );
121 +      return 0;
122 +    }
123 +    break;
124 +
125 +
126 +  case RIGIDBODY_BLK:
127 +    
128 +    switch( the_event->event_type ){
129 +      
130 +    case ASSIGNMENT:
131 +      handled = the_stamps->rigidBodyAssign( the_event );
132 +      break;
133 +
134 +    case MEMBERS:
135 +      handled = the_stamps->rigidBodyMembers( the_event );
136 +      break;
137 +      
138 +    case BLOCK_END:
139 +      decr_block();
140 +      handled = the_stamps->rigidBodyEnd( the_event );
141 +      break;
142 +      
143 +    default:
144 +      the_event->err_msg =
145 +        strdup( "Not a valid RigidBody event\n" );
146        return 0;
147      }
148      break;
149 +    
150  
151    case ATOM_BLK:
152      
# Line 152 | Line 184 | int event_handler( event* the_event ){
184        handled = the_stamps->bondAssign( the_event );
185        break;
186        
187 <    case MEMBER:
188 <      handled = the_stamps->bondMember( the_event );
187 >    case MEMBERS:
188 >      handled = the_stamps->bondMembers( the_event );
189        break;
190        
191      case CONSTRAINT:
# Line 180 | Line 212 | int event_handler( event* the_event ){
212        handled = the_stamps->bendAssign( the_event );
213        break;
214        
215 <    case MEMBER:
216 <      handled = the_stamps->bendMember( the_event );
215 >    case MEMBERS:
216 >      handled = the_stamps->bendMembers( the_event );
217        break;
218        
219      case CONSTRAINT:
# Line 208 | Line 240 | int event_handler( event* the_event ){
240        handled = the_stamps->torsionAssign( the_event );
241        break;
242        
243 <    case MEMBER:
244 <      handled = the_stamps->torsionMember( the_event );
243 >    case MEMBERS:
244 >      handled = the_stamps->torsionMembers( the_event );
245        break;
246        
247      case CONSTRAINT:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines