| 253 | } |
| 254 | |
| 255 | Result Model::addOutput(const std::string& targetName, |
| 256 | FeatureType targetType) { |
| 257 | Specification::ModelDescription* interface = m_spec->mutable_description(); |
| 258 | Specification::FeatureDescription *arg = interface->add_output(); |
| 259 | arg->set_name(targetName); |
| 260 | arg->set_allocated_type(targetType.allocateCopy()); |
| 261 | return Result(); |
| 262 | } |
| 263 | |
| 264 | MLModelType Model::modelType() const { |
| 265 | return static_cast<MLModelType>(m_spec->Type_case()); |