ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/FAS/src/fasresidue.cpp
(Generate patch)

Comparing trunk/FAS/src/fasresidue.cpp (file contents):
Revision 87 by tim, Wed Aug 14 16:03:32 2002 UTC vs.
Revision 88 by tim, Mon Aug 19 20:49:08 2002 UTC

# Line 23 | Line 23 | TFASResidue::TFASResidue()
23   #include "fasbond.h"
24   #include "bitvector.h"
25  
26 + //constuctor/destructor
27   TFASResidue::TFASResidue()
28   {
29 +  Clear();
30 + }
31  
32 + TFASResidue::TFASResidue(const unsigned int index)
33 + {
34 +  Clear();
35 +
36 +  _index = index;
37   }
38  
39 < TFASResidue::TFASResidue(int index, int resid)
39 > TFASResidue::TFASResidue(const TFASResidue &residue)
40   {
41 +    _index = residue._index;
42 +    _resid = residue._resid;
43 +    _model = residue._model;
44 +     _mol = residue._mol;
45 +   _atomList = residue._atomList;
46  
47   }
48  
49   TFASResidue::~TFASResidue()
50   {
51 <
51 >  Clear();
52   }
53  
54   void TFASResidue::Clear()
55   {
56 +  vector<TFASAtom *>::iterator i;
57 +  TFASAtom *atom;
58 +  for (atom=BeginAtom(i); atom!=NULL;atom=NextAtom(i))
59 +  {
60 +    atom->SetResidue(NULL);
61 +  }
62  
63 +  _index = -1;
64 +  _resid = -1;
65 +  _mol = NULL;
66 +  _model = NULL;
67 +  _atomList.clear();
68   }
69  
70 + //overload operator =
71 + TFASResidue &TFASResidue::operator =(const TFASResidue &residue)
72 + {
73 +  if (this != &residue)
74 +  {
75 +    _index = residue._index;
76 +    _resid = residue._resid;
77 +    _model = residue._model;
78 +     _mol = residue._mol;
79 +   _atomList = residue._atomList;
80 +  }
81 +
82 +  return *this;
83 + }
84 + //method to traverse atoms
85   TFASAtom *TFASResidue::BeginAtom(vector<TFASAtom *>::iterator &i)
86   {
87    i = _atomList.begin();
# Line 114 | Line 153 | vector<TFASBond *> TFASResidue::GetBonds(bool exterior
153        {
154          if (!exterior)
155          {
156 <          if ((bond->GetNbrAtom(atom))->GetResidue == this)
156 >          if ((bond->GetNbrAtom(atom))->GetResidue() == this)
157            {
158              bondList.push_back(bond);
159            }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines