00001
00002
00003 #ifndef StateHistory_CLI_h
00004 #define StateHistory_CLI_h
00005
00006 #include "StateHistory.h"
00007 #include <string>
00008
00009 #include "Serializable.h"
00010
00011
00012 using namespace std;
00013
00017 class StateHistory_CLI : public StateHistory
00018 {
00019
00020 public:
00022 StateHistory_CLI();
00023
00025 inline vector<string> getCommands() { return sh_history; }
00026
00028 void capture();
00029
00031 void restore();
00032
00033 private:
00036 vector<string> sh_history;
00037
00038
00039 private:
00040 friend class boost::serialization::access;
00041 template<class Archive>
00042 void serialize(Archive & ar, const unsigned int version) {
00043 this->pre_serialize(ar, version);
00044 try {
00045 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(StateHistory);
00046 BIE_CATCH_BOOST_SERIALIZATION_EXCEPTION;
00047 }
00048 try {
00049 ar & BOOST_SERIALIZATION_NVP(sh_history);
00050 BIE_CATCH_BOOST_SERIALIZATION_EXCEPTION;
00051 }
00052 this->post_serialize(ar, version);
00053 }
00054
00055 };
00056
00057 BIE_CLASS_TYPE_INFO(StateHistory_CLI)
00058 BIE_CLASS_EXPORT_KEY(StateHistory_CLI)
00059 #endif