19 #ifndef _OBJCRYST_UNDO_H_
20 #define _OBJCRYST_UNDO_H_
25 #include <boost/shared_ptr.hpp>
26 #include <boost/date_time.hpp>
28 #include "ObjCryst/RefinableObj/IO.h"
29 #include "ObjCryst/ObjCryst/Crystal.h"
30 #include "ObjCryst/ObjCryst/PowderPattern.h"
31 #include "ObjCryst/ObjCryst/DiffractionDataSingleCrystal.h"
32 #include "ObjCryst/RefinableObj/GlobalOptimObj.h"
56 std::map<Crystal*, boost::shared_ptr<std::string> > mvpCrystalXML;
57 std::map<PowderPattern*, boost::shared_ptr<std::string> > mvpPowderPatternXML;
58 std::map<DiffractionDataSingleCrystal*, boost::shared_ptr<std::string> > mvpDiffractionDataSingleCrystalXML;
59 std::map<OptimizationObj*, boost::shared_ptr<std::string> > mvpOptimizationObjXML;
60 boost::posix_time::ptime mTime;
80 void Restore(boost::shared_ptr<XMLConfig> &p);
82 std::list<boost::shared_ptr<XMLConfig> >
GetList();
84 const std::list<boost::shared_ptr<XMLConfig> >
GetList()
const;
The namespace which includes all objects (crystallographic and algorithmic) in ObjCryst++.
XMLConfigHistory gConfigHistory
Global object to hold configurations history.
Class to store & restore all top-level ObjCryst++ objects as their XML description.
RefinableObjClock mClock
Clock recording the creation of this XMLConfig.
XMLConfig()
Default cronstructor.
void Restore()
Restore the saved XML configuration.
bool operator!=(const XMLConfig &rhs) const
Non-equality operator.
bool operator==(const XMLConfig &rhs) const
Equality operator.
const RefinableObjClock & GetClock() const
Access the clock corresponding to the creation of this config.
Class to store XMLConfig configurations.
boost::shared_ptr< XMLConfig > mpCurrentConfig
The current configuration loaded (can be null if none is selected) This is reset every time a change ...
void Restore(boost::shared_ptr< XMLConfig > &p)
Restore a configuration.
XMLConfigHistory(const int maxnb=20)
Constructor.
std::list< boost::shared_ptr< XMLConfig > > GetList()
Access the list of configurations.
bool Next()
Reload the next (more recent) configuration in the list.
bool mLock
Lock used during Store and Restore.
std::list< boost::shared_ptr< XMLConfig > > mvpConfig
List of configurations.
int mMaxNb
Maximum number of stored configurations.
bool Store()
Store a new configuration.
bool Previous()
Reload the previous (older) configuration in the list.
We need to record exactly when refinable objects have been modified for the last time (to avoid re-co...