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

Comparing branches/new_design/OOPSE-4/src/brains/SimSnapshotManager.cpp (file contents):
Revision 1699 by tim, Tue Nov 2 17:00:12 2004 UTC vs.
Revision 1820 by tim, Thu Dec 2 00:09:35 2004 UTC

# Line 23 | Line 23 | namespace oopse {
23   *
24   */
25  
26 + #include "brains/SimInfo.hpp"
27 + #include "brains/SimSnapshotManager.hpp"
28 +
29   namespace oopse {
30  
31 < SimSnapshotManager::SimSnapshotManager(SimModel* model) : model_(model){
32 <    int nAtoms = model->getNAtoms();
33 <    int nRigidBodies = model->getNRigidBodies();
31 > SimSnapshotManager::SimSnapshotManager(SimInfo* info) : info_(info){
32 >    int nAtoms = info_->getNAtoms();
33 >    int nRigidBodies = info_->getNRigidBodies();
34      
35      //allocate memory for snapshots
36      previousSnapshot_ = new Snapshot(nAtoms, nRigidBodies);
# Line 37 | Line 40 | bool SimSnapshotManager::advance() {
40   bool SimSnapshotManager::advance() {
41  
42      *previousSnapshot_ = *currentSnapshot_;
43 +    currentSnapshot_->setID(currentSnapshot_->getID() + 1);    
44 +    return true;
45   }
46  
47   Snapshot* SimSnapshotManager::getSnapshot(int id) {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines