MCPcopy Create free account
hub / github.com/MITK/MITK / ValidateOutputLocation

Method ValidateOutputLocation

Modules/Core/src/IO/mitkAbstractFileWriter.cpp:276–287  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274 std::string AbstractFileWriter::GetDescription() const { return d->GetDescription(); }
275 std::string AbstractFileWriter::GetBaseDataType() const { return d->m_BaseDataType; }
276 void AbstractFileWriter::ValidateOutputLocation() const
277 {
278 if (this->GetOutputStream() == nullptr)
279 {
280 // check if a file name is set and if we can write to it
281 const std::string fileName = this->GetOutputLocation();
282 if (fileName.empty())
283 {
284 mitkThrow() << "No output location or stream specified";
285 }
286 }
287 }
288
289 void AbstractFileWriter::SetDescription(const std::string &description) { d->SetDescription(description); }
290}

Callers 1

WriteMethod · 0.80

Calls 3

GetOutputStreamMethod · 0.95
GetOutputLocationMethod · 0.95
emptyMethod · 0.45

Tested by

no test coverage detected