MCPcopy Create free account
hub / github.com/MyGUI/mygui / registerFactory

Method registerFactory

MyGUIEngine/src/MyGUI_FactoryManager.cpp:39–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37 }
38
39 void FactoryManager::registerFactory(
40 std::string_view _category,
41 std::string_view _type,
42 Delegate::IDelegate* _delegate)
43 {
44 //FIXME
45 auto category = mRegisterFactoryItems.find(_category);
46 if (category == mRegisterFactoryItems.end())
47 category = mRegisterFactoryItems.emplace(_category, MapFactoryItem()).first;
48 auto type = category->second.find(_type);
49 if (type == category->second.end())
50 type = category->second.emplace(_type, Delegate()).first;
51 type->second = _delegate;
52 }
53
54 void FactoryManager::unregisterFactory(std::string_view _category, std::string_view _type)
55 {

Callers

nothing calls this directly

Calls 3

DelegateClass · 0.85
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected