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

Function GetNamedObject

Modules/Core/include/mitkDataStorage.h:252–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

250 */
251 template <class DataType>
252 DataType *GetNamedObject(const char *name) const
253 {
254 if (name == nullptr)
255 return nullptr;
256 DataNode *n = this->GetNamedNode(name);
257 if (n == nullptr)
258 return nullptr;
259 else
260 return dynamic_cast<DataType *>(n->GetData());
261 }
262
263 /**
264 * \brief Convenience method to get the first data object of a given type with a given name (std::string overload).

Callers

nothing calls this directly

Calls 2

GetNamedNodeMethod · 0.80
GetDataMethod · 0.45

Tested by

no test coverage detected