ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-3.0/src/types/BondStamp.cpp
(Generate patch)

Comparing trunk/OOPSE-3.0/src/types/BondStamp.cpp (file contents):
Revision 2204 by gezelter, Fri Apr 15 22:04:00 2005 UTC vs.
Revision 2469 by tim, Fri Dec 2 15:38:03 2005 UTC

# Line 43 | Line 43
43   #include <string.h>
44  
45   #include "types/BondStamp.hpp"
46 + namespace oopse {
47  
47 BondStamp::BondStamp(){
48  
49  have_mbrs = 0;
50  have_constraint = 0;
51  
52  unhandled = NULL;
53  have_extras = 0;
54 }
48  
56 BondStamp::~BondStamp(){
57  
58  if( unhandled != NULL ) delete unhandled;
49   }
60
61 void BondStamp::members( int the_a, int the_b ){
62  
63  a = the_a;
64  b = the_b;
65  have_mbrs = 1;
66 }
67
68 void BondStamp::constrain( double the_constraint ){
69  
70  constraint = the_constraint;
71  have_constraint = 1;
72 }
73
74 void BondStamp::assignString( char* lhs, char* rhs ){
75
76  if( unhandled == NULL ) unhandled = new LinkedAssign( lhs, rhs );
77  else unhandled->add( lhs, rhs );
78  have_extras = 1;
79 }
80
81 void BondStamp::assignDouble( char* lhs, double rhs ){
82  
83  if( unhandled == NULL ) unhandled = new LinkedAssign( lhs, rhs );
84  else unhandled->add( lhs, rhs );
85  have_extras = 1;
86 }
87
88 void BondStamp::assignInt( char* lhs, int rhs ){
89  
90  if( unhandled == NULL ) unhandled = new LinkedAssign( lhs, rhs );
91  else unhandled->add( lhs, rhs );
92  have_extras = 1;
93 }
94
95 char* BondStamp::checkMe(){
96
97  if( !have_mbrs ){
98    return strdup( "BondStamp error. Bond was not given members." );
99  }
100  
101  return NULL;
102 }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines