ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/branches/new_design/OOPSE-3.0/src/brains/SimSnapshotManager.cpp
(Generate patch)

Comparing branches/new_design/OOPSE-3.0/src/brains/SimSnapshotManager.cpp (file contents):
Revision 1683, Thu Oct 28 22:34:02 2004 UTC vs.
Revision 1765 by tim, Mon Nov 22 20:55:52 2004 UTC

# Line 25 | Line 25 | SimSnapshotManager::SimSnapshotManager(){
25  
26   namespace oopse {
27  
28 < SimSnapshotManager::SimSnapshotManager(){
28 > SimSnapshotManager::SimSnapshotManager(SimInfo* info) : info_(info){
29 >    int nAtoms = info_->getNAtoms();
30 >    int nRigidBodies = info_->getNRigidBodies();
31 >    
32      //allocate memory for snapshots
33 <    previousSnapshot_ = new Snapshot();
34 <    currentSnapshot_ = new Snapshot();
33 >    previousSnapshot_ = new Snapshot(nAtoms, nRigidBodies);
34 >    currentSnapshot_ = new Snapshot(nAtoms, nRigidBodies);
35   }
36  
37   bool SimSnapshotManager::advance() {
38  
39      *previousSnapshot_ = *currentSnapshot_;
40 +    currentSnapshot_->setID(currentSnapshot_->getID() + 1);
41   }
42  
43   Snapshot* SimSnapshotManager::getSnapshot(int id) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines