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

Merge from branch tonioni
author Chris Cannam
date Tue, 11 Mar 2014 17:30:35 +0000
parents b109b88bfa85
children 6ea7761a418b
comparison
equal deleted inserted replaced
874:862fe7b20df7 890:4cbf8c6a462d
88 /** 88 /**
89 * Return the set of output models, also detaching them from the 89 * Return the set of output models, also detaching them from the
90 * transformer so that they will not be deleted when the 90 * transformer so that they will not be deleted when the
91 * transformer is. The caller takes ownership of the models. 91 * transformer is. The caller takes ownership of the models.
92 */ 92 */
93 Models detachOutputModels() { m_detached = true; return m_outputs; } 93 Models detachOutputModels() {
94 m_detached = true;
95 return getOutputModels();
96 }
97
98 /**
99 * Return any additional models that were created during
100 * processing. This might happen if, for example, a transform was
101 * configured to split a multi-bin output into separate single-bin
102 * models as it processed. These should not be queried until after
103 * the transform has completed.
104 */
105 virtual Models getAdditionalOutputModels() { return Models(); }
106
107 /**
108 * Return true if the current transform is one that may produce
109 * additional models (to be retrieved through
110 * getAdditionalOutputModels above).
111 */
112 virtual bool willHaveAdditionalOutputModels() { return false; }
113
114 /**
115 * Return the set of additional models, also detaching them from
116 * the transformer. The caller takes ownership of the models.
117 */
118 virtual Models detachAdditionalOutputModels() {
119 m_detachedAdd = true;
120 return getAdditionalOutputModels();
121 }
94 122
95 /** 123 /**
96 * Return a warning or error message. If getOutputModel returned 124 * Return a warning or error message. If getOutputModel returned
97 * a null pointer, this should contain a fatal error message for 125 * a null pointer, this should contain a fatal error message for
98 * the transformer; otherwise it may contain a warning to show to 126 * the transformer; otherwise it may contain a warning to show to
106 134
107 Transforms m_transforms; 135 Transforms m_transforms;
108 Input m_input; // I don't own the model in this 136 Input m_input; // I don't own the model in this
109 Models m_outputs; // I own this, unless... 137 Models m_outputs; // I own this, unless...
110 bool m_detached; // ... this is true. 138 bool m_detached; // ... this is true.
139 bool m_detachedAdd;
111 bool m_abandoned; 140 bool m_abandoned;
112 QString m_message; 141 QString m_message;
113 }; 142 };
114 143
115 #endif 144 #endif