123456789101112131415161718 |
- #include "originator.hh"
- void Originator::setState(std::string state){
- this->state = state;
- }
- std::string Originator::getState(){
- return state;
- }
- Memento* Originator::saveStateToMemento(){
- return new Memento(state);
- }
- void Originator::getStateFromMemento(Memento* memento){
- state = memento->getState();
- }
|