-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathQuitCommand.cpp
More file actions
executable file
·40 lines (35 loc) · 1.14 KB
/
QuitCommand.cpp
File metadata and controls
executable file
·40 lines (35 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//------------------------------------------------------------------------------
/// Filename: QuitCommand.cpp
/// Description: Base Class for QuitCommands
/// Authors:
/// Robin Ankele(0931951)
/// Tutor: Manuel Weber
/// Group: 24
/// Created: 08.09.2011
/// Last change: 09.09.2011
//------------------------------------------------------------------------------
#include "QuitCommand.h"
#include "UserInterface.h"
#include "Database.h"
#include "SVGDocument.h"
//------------------------------------------------------------------------------
QuitCommand::QuitCommand(UserInterface *ui,
Database *db,
SVGDocument *svgdoc): Command(ui,db),
svgdoc_(svgdoc)
{
name_.assign("quit");
}
//------------------------------------------------------------------------------
QuitCommand::~QuitCommand() throw()
{
}
//------------------------------------------------------------------------------
bool QuitCommand::execute()
{
if(!svgdoc_->writeSVG())
return false;
else
ui_->setRun(false);
return true;
}