My Project
F:
University
Git
lego
lego
application.cpp
Go to the documentation of this file.
1
#include "
stdafx.h
"
2
#include "
application.h
"
3
#include "
model\loader.h
"
4
#include "
scene\scene.h
"
5
6
Application::Application
()
7
{
8
}
9
10
Application::Application
(HWND hWnd,
int
x,
int
y,
int
width,
int
height)
11
{
12
this->scene =
new
Scene
(hWnd, x, y, width, height);
13
if
(!this->scene)
14
{
15
throw
AllocationMemoryError
();
16
}
17
18
this->loadedBricks =
new
Composite
;
19
if
(!this->loadedBricks)
20
{
21
delete
this->scene;
22
this->scene =
nullptr
;
23
throw
AllocationMemoryError
();
24
}
25
}
26
27
Application::~Application
()
28
{
29
delete
this->scene;
30
delete
this->loadedBricks;
31
this->scene =
nullptr
;
32
this->loadedBricks =
nullptr
;
33
}
34
35
void
Application::call
(
Action
& act,
int
ID)
36
{
37
act.
Execute
(this->scene, this->loadedBricks, ID);
38
}
Composite
Contains loaded bricks.
Definition:
composite.h:23
application.h
Application::call
void call(Action &act, int id)
Definition:
application.cpp:35
scene.h
Application::Application
Application()
Definition:
application.cpp:6
Application::~Application
~Application()
Definition:
application.cpp:27
Action
Definition:
action.h:5
AllocationMemoryError
Definition:
exception.h:10
loader.h
stdafx.h
Scene
Main scene.
Definition:
scene.h:29
Action::Execute
virtual void Execute(Scene *scene, Composite *loadedBricks, int ID)=0
Generated by
1.8.12