comparison transform/ModelTransformer.cpp @ 876:47aa3aeb687b tonioni

For outputs with unknown bin count or multiple bins with variable sample rate, create additional output models for bins beyond the first
author Chris Cannam
date Wed, 29 Jan 2014 09:31:22 +0000
parents 418cd2064769
children b109b88bfa85
comparison
equal deleted inserted replaced
875:3e6ed8a8577b 876:47aa3aeb687b
34 ModelTransformer::~ModelTransformer() 34 ModelTransformer::~ModelTransformer()
35 { 35 {
36 m_abandoned = true; 36 m_abandoned = true;
37 wait(); 37 wait();
38 if (!m_detached) { 38 if (!m_detached) {
39 foreach (Model *m, m_outputs) { 39 Models mine = getOutputModels(); // including any additional ones
40 foreach (Model *m, mine) {
40 delete m; 41 delete m;
41 } 42 }
42 } 43 }
43 } 44 }
44 45
46 ModelTransformer::Models
47 ModelTransformer::getOutputModels()
48 {
49 Models out(m_outputs);
50 Models add(getAdditionalOutputModels());
51 foreach (Model *m, add) out.push_back(m);
52 return out;
53 }
54