| 161 | |
| 162 | |
| 163 | void PipelineManager::validateStageOptions() const |
| 164 | { |
| 165 | // Make sure that the options specified are for relevant stages. |
| 166 | for (auto& si : m_stageOptions) |
| 167 | { |
| 168 | const std::string& stageName = si.first; |
| 169 | auto it = std::find_if(m_stages.begin(), m_stages.end(), |
| 170 | [stageName](Stage *s) |
| 171 | { return (s->getName() == stageName || |
| 172 | "stage." + s->tag() == stageName); }); |
| 173 | |
| 174 | // If the option stage name matches no created stage, then error. |
| 175 | if (it == m_stages.end()) |
| 176 | { |
| 177 | std::ostringstream oss; |
| 178 | oss << "Argument references invalid/unused stage: '" << |
| 179 | stageName << "'."; |
| 180 | throw pdal_error(oss.str()); |
| 181 | } |
| 182 | } |
| 183 | } |
| 184 | |
| 185 | |
| 186 | bool PipelineManager::pipelineStreamable() const |