--- trunk/OOPSE/libBASS/BASS_interface.cpp 2003/03/21 17:42:12 378 +++ trunk/OOPSE/libBASS/BASS_interface.cpp 2003/08/11 19:38:44 675 @@ -15,7 +15,7 @@ typedef enum { GLOBAL_BLK, MOLECULE_BLK, ATOM_BLK, BON // Globals ************************************************ typedef enum { GLOBAL_BLK, MOLECULE_BLK, ATOM_BLK, BOND_BLK, BEND_BLK, - TORSION_BLK, COMPONENT_BLK } block_type; + TORSION_BLK, COMPONENT_BLK, ZCONSTRAINT_BLK } block_type; block_type current_block = GLOBAL_BLK; #define MAX_NEST 20 // the max number of nested blocks @@ -50,6 +50,11 @@ int event_handler( event* the_event ){ incr_block( MOLECULE_BLK ); handled = the_stamps->newMolecule( the_event ); break; + + case ZCONSTRAINT: + incr_block( ZCONSTRAINT_BLK ); + handled = the_globals->newZconstraint( the_event ); + break; case COMPONENT: incr_block( COMPONENT_BLK ); @@ -222,6 +227,26 @@ int event_handler( event* the_event ){ return 0; } break; + + case ZCONSTRAINT_BLK: + + switch( the_event->event_type ){ + + case ASSIGNMENT: + handled = the_globals->zConstraintAssign( the_event ); + break; + + case BLOCK_END: + decr_block(); + handled = the_globals->zConstraintEnd( the_event ); + break; + + default: + the_event->err_msg = + strdup( "not a valid zConstraint event\n" ); + return 0; + } + break; case COMPONENT_BLK: @@ -231,10 +256,6 @@ int event_handler( event* the_event ){ handled = the_globals->componentAssign( the_event ); break; - case START_INDEX: - handled = the_globals->componentStartIndex( the_event ); - break; - case BLOCK_END: decr_block(); handled = the_globals->componentEnd(the_event );