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

Method Register

Modules/Forms/src/mitkQuestionFactory.cpp:26–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24}
25
26void QuestionFactory::Register(Question* question)
27{
28 auto type = question->GetType();
29
30 if (m_Prototypes.find(type) != m_Prototypes.end())
31 mitkThrow() << "A prototype is already registered for questions of type \"" << type << "\"!";
32
33 m_Prototypes[type].reset(question);
34}
35
36Question* QuestionFactory::Create(const std::string& type) const
37{

Callers 1

RegisterQuestionMethod · 0.45

Calls 4

resetMethod · 0.80
GetTypeMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected