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

40 lines
569 B
C++

#ifndef __MEMENTO_H__
#define __MEMENTO_H__
#include <string>
using namespace std;
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