ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/src/types/BondStamp.cpp
Revision: 1492
Committed: Fri Sep 24 16:27:58 2004 UTC (19 years, 9 months ago) by tim
File size: 1152 byte(s)
Log Message:
change the #include in source files

File Contents

# User Rev Content
1 gezelter 1490 #include <stdlib.h>
2     #include <string.h>
3    
4 tim 1492 #include "types/BondStamp.hpp"
5 gezelter 1490
6     BondStamp::BondStamp(){
7    
8     have_mbrs = 0;
9     have_constraint = 0;
10    
11     unhandled = NULL;
12     have_extras = 0;
13     }
14    
15     BondStamp::~BondStamp(){
16    
17     if( unhandled != NULL ) delete unhandled;
18     }
19    
20     void BondStamp::members( int the_a, int the_b ){
21    
22     a = the_a;
23     b = the_b;
24     have_mbrs = 1;
25     }
26    
27     void BondStamp::constrain( double the_constraint ){
28    
29     constraint = the_constraint;
30     have_constraint = 1;
31     }
32    
33     void BondStamp::assignString( char* lhs, char* rhs ){
34    
35     if( unhandled == NULL ) unhandled = new LinkedAssign( lhs, rhs );
36     else unhandled->add( lhs, rhs );
37     have_extras = 1;
38     }
39    
40     void BondStamp::assignDouble( char* lhs, double rhs ){
41    
42     if( unhandled == NULL ) unhandled = new LinkedAssign( lhs, rhs );
43     else unhandled->add( lhs, rhs );
44     have_extras = 1;
45     }
46    
47     void BondStamp::assignInt( char* lhs, int rhs ){
48    
49     if( unhandled == NULL ) unhandled = new LinkedAssign( lhs, rhs );
50     else unhandled->add( lhs, rhs );
51     have_extras = 1;
52     }
53    
54     char* BondStamp::checkMe(){
55    
56     if( !have_mbrs ){
57     return strdup( "BondStamp error. Bond was not given members." );
58     }
59    
60     return NULL;
61     }