ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/visitors/AtomData.hpp
(Generate patch)

Comparing trunk/OOPSE-4/src/visitors/AtomData.hpp (file contents):
Revision 1930 by gezelter, Wed Jan 12 22:41:40 2005 UTC vs.
Revision 2204 by gezelter, Fri Apr 15 22:04:00 2005 UTC

# Line 1 | Line 1
1 < /*
1 > /*
2   * Copyright (c) 2005 The University of Notre Dame. All Rights Reserved.
3   *
4   * The University of Notre Dame grants you ("Licensee") a
# Line 49 | Line 49 | struct AtomInfo {
49  
50   namespace oopse {
51  
52 < struct AtomInfo {
53 <    std::string AtomType;
52 >  struct AtomInfo {
53 >    std::string atomTypeName;
54      Vector3d pos;
55      Vector3d dipole;  
56 < };
56 >  };
57  
58 < class AtomData : public GenericData{
59 <    public:
58 >  class AtomData : public GenericData{
59 >  public:
60  
61 <        AtomData(const std::string& id = "ATOMDATA") : GenericData(id) {}
61 >    AtomData(const std::string& id = "ATOMDATA") : GenericData(id) {}
62  
63 <        ~AtomData() {
64 <            std::vector<AtomInfo*>::iterator i;
65 <            AtomInfo* atomInfo;
63 >    ~AtomData() {
64 >      std::vector<AtomInfo*>::iterator i;
65 >      AtomInfo* atomInfo;
66  
67 <            for(atomInfo = beginAtomInfo(i); atomInfo; atomInfo  = nextAtomInfo(i)) {
68 <                delete atomInfo;
69 <            }
70 <            data.clear();
71 <        }
67 >      for(atomInfo = beginAtomInfo(i); atomInfo; atomInfo  = nextAtomInfo(i)) {
68 >        delete atomInfo;
69 >      }
70 >      data.clear();
71 >    }
72          
73 <        void addAtomInfo(AtomInfo* info) {data.push_back(info);}
73 >    void addAtomInfo(AtomInfo* info) {data.push_back(info);}
74  
75 <        void clearAllAtomInfo();
75 >    void clearAllAtomInfo();
76  
77 <        AtomInfo* beginAtomInfo(std::vector<AtomInfo*>::iterator& i){
78 <            i = data.begin();
79 <            return i != data.end()? *i : NULL;
80 <        }
77 >    AtomInfo* beginAtomInfo(std::vector<AtomInfo*>::iterator& i){
78 >      i = data.begin();
79 >      return i != data.end()? *i : NULL;
80 >    }
81  
82 <        AtomInfo* nextAtomInfo(std::vector<AtomInfo*>::iterator& i){
83 <            ++i;
84 <            return i != data.end()? *i: NULL;
85 <        }
82 >    AtomInfo* nextAtomInfo(std::vector<AtomInfo*>::iterator& i){
83 >      ++i;
84 >      return i != data.end()? *i: NULL;
85 >    }
86  
87 <        std::vector<AtomInfo*> getData() {return data;}
87 >    std::vector<AtomInfo*> getData() {return data;}
88  
89 <        int getSize() {return data.size();}
89 >    int getSize() {return data.size();}
90  
91 <    protected:
91 >  protected:
92  
93 <        std::vector<AtomInfo*> data;
94 < };
93 >    std::vector<AtomInfo*> data;
94 >  };
95  
96  
97   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines