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

Method createObject

MyGUIEngine/src/MyGUI_FactoryManager.cpp:80–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78 }
79
80 IObject* FactoryManager::createObject(std::string_view _category, std::string_view _type)
81 {
82 MapRegisterFactoryItem::iterator category = mRegisterFactoryItems.find(_category);
83 if (category == mRegisterFactoryItems.end())
84 {
85 return nullptr;
86 }
87
88 std::string_view typeName = BackwardCompatibility::getFactoryRename(_category, _type);
89 MapFactoryItem::iterator type = category->second.find(typeName);
90 if (type == category->second.end())
91 {
92 return nullptr;
93 }
94 if (type->second.empty())
95 {
96 return nullptr;
97 }
98
99 IObject* result = nullptr;
100 type->second(result);
101 return result;
102 }
103
104 void FactoryManager::destroyObject(IObject* _object)
105 {

Callers 7

_createLayerObjectMethod · 0.45
deserializationMethod · 0.45
loadOldSkinFormatMethod · 0.45
loadFromXmlNodeMethod · 0.45
createWidgetMethod · 0.45
_createSkinItemMethod · 0.45
createItemMethod · 0.45

Calls 3

findMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected