2019-11-05 14:47:55 +00:00
|
|
|
|
#include "Originator.h"
|
|
|
|
|
#include "Memento.h"
|
|
|
|
|
#include "CodeManager.h"
|
|
|
|
|
|
|
|
|
|
int main()
|
|
|
|
|
{
|
|
|
|
|
CodeManager *Jungle = new CodeManager();
|
|
|
|
|
|
|
|
|
|
CodeVersion* codeVer = new CodeVersion(1001, "2019-11-03", "Initial version");
|
|
|
|
|
|
|
|
|
|
// <20>ύ<EFBFBD><E1BDBB>ʼ<EFBFBD>汾
|
|
|
|
|
printf("<EFBFBD>ύ<EFBFBD><EFBFBD>ʼ<EFBFBD>汾:\n");
|
|
|
|
|
Jungle->commit(codeVer->save());
|
|
|
|
|
|
|
|
|
|
// <20><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>汾<EFBFBD><E6B1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><D6BE><EFBFBD><EFBFBD>
|
|
|
|
|
printf("\n<EFBFBD>ύһ<EFBFBD><EFBFBD><EFBFBD>汾<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>־<EFBFBD><EFBFBD><EFBFBD><EFBFBD>:\n");
|
|
|
|
|
codeVer->setVersion(1002);
|
|
|
|
|
codeVer->setDate("2019-11-04");
|
|
|
|
|
codeVer->setLabel("Add log funciton");
|
|
|
|
|
Jungle->commit(codeVer->save());
|
|
|
|
|
|
|
|
|
|
// <20><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>汾<EFBFBD><E6B1BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QtͼƬ<CDBC><C6AC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
printf("\n<EFBFBD>ύһ<EFBFBD><EFBFBD><EFBFBD>汾<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>QtͼƬ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>:\n");
|
|
|
|
|
codeVer->setVersion(1003);
|
|
|
|
|
codeVer->setDate("2019-11-05");
|
|
|
|
|
codeVer->setLabel("Add Qt Image Browser");
|
|
|
|
|
Jungle->commit(codeVer->save());
|
|
|
|
|
|
|
|
|
|
// <20>鿴<EFBFBD>ύ<EFBFBD><E1BDBB>ʷ
|
|
|
|
|
printf("\n<EFBFBD>鿴<EFBFBD>ύ<EFBFBD><EFBFBD>ʷ\n");
|
|
|
|
|
Jungle->codeLog();
|
|
|
|
|
|
|
|
|
|
// <20><><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>һ<EFBFBD><D2BB><EFBFBD>汾
|
|
|
|
|
printf("\n<EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD>汾\n");
|
|
|
|
|
codeVer->restore(Jungle->switchToPointedVersion(1));
|
|
|
|
|
|
|
|
|
|
// <20>鿴<EFBFBD>ύ<EFBFBD><E1BDBB>ʷ
|
|
|
|
|
printf("\n<EFBFBD>鿴<EFBFBD>ύ<EFBFBD><EFBFBD>ʷ\n");
|
|
|
|
|
Jungle->codeLog();
|
|
|
|
|
|
|
|
|
|
printf("\n\n");
|
|
|
|
|
system("pause");
|
2020-11-29 03:17:40 +00:00
|
|
|
|
|
|
|
|
|
delete Jungle;
|
|
|
|
|
delete codeVer;
|
2022-03-09 23:53:38 +00:00
|
|
|
|
Jungle = nullptr;
|
|
|
|
|
codeVer = nullptr;
|
2020-11-29 03:17:40 +00:00
|
|
|
|
|
2019-11-05 14:47:55 +00:00
|
|
|
|
return 0;
|
|
|
|
|
}
|