DesignPattern/19.MementoPattern/2.Code/Memento.h

40 lines
569 B
C
Raw Normal View History

2019-11-05 14:47:55 +00:00
#ifndef __MEMENTO_H__
#define __MEMENTO_H__
#include <string>
using namespace std;
2019-11-05 14:47:55 +00:00
class Memento
{
public:
Memento(){}
Memento(int iVersion, string iDate, string iLabel){
version = iVersion;
date = iDate;
label = iLabel;
}
void setVersion(int iVersion){
version = iVersion;
}
int getVersion(){
return version;
}
void setLabel(string iLabel){
label = iLabel;
}
string getLabel(){
return label;
}
void setDate(string iDate){
date = iDate;
}
string getDate(){
return date;
}
private:
int version;
string date;
string label;
};
#endif