comparison transform/ModelTransformer.cpp @ 890:4cbf8c6a462d tony_integration

Merge from branch tonioni
author Chris Cannam
date Tue, 11 Mar 2014 17:30:35 +0000
parents b109b88bfa85
children fe3f7f8df3a3
comparison
equal deleted inserted replaced
874:862fe7b20df7 890:4cbf8c6a462d
16 #include "ModelTransformer.h" 16 #include "ModelTransformer.h"
17 17
18 ModelTransformer::ModelTransformer(Input input, const Transform &transform) : 18 ModelTransformer::ModelTransformer(Input input, const Transform &transform) :
19 m_input(input), 19 m_input(input),
20 m_detached(false), 20 m_detached(false),
21 m_detachedAdd(false),
21 m_abandoned(false) 22 m_abandoned(false)
22 { 23 {
23 m_transforms.push_back(transform); 24 m_transforms.push_back(transform);
24 } 25 }
25 26
26 ModelTransformer::ModelTransformer(Input input, const Transforms &transforms) : 27 ModelTransformer::ModelTransformer(Input input, const Transforms &transforms) :
27 m_transforms(transforms), 28 m_transforms(transforms),
28 m_input(input), 29 m_input(input),
29 m_detached(false), 30 m_detached(false),
31 m_detachedAdd(false),
30 m_abandoned(false) 32 m_abandoned(false)
31 { 33 {
32 } 34 }
33 35
34 ModelTransformer::~ModelTransformer() 36 ModelTransformer::~ModelTransformer()
35 { 37 {
36 m_abandoned = true; 38 m_abandoned = true;
37 wait(); 39 wait();
38 if (!m_detached) { 40 if (!m_detached) {
39 foreach (Model *m, m_outputs) { 41 Models mine = getOutputModels();
40 delete m; 42 foreach (Model *m, mine) delete m;
41 } 43 }
44 if (!m_detachedAdd) {
45 Models mine = getAdditionalOutputModels();
46 foreach (Model *m, mine) delete m;
42 } 47 }
43 } 48 }
44 49