MCPcopy Create free account
hub / github.com/OAID/Tengine / LoadPlugin

Method LoadPlugin

core/lib/tengine_plugin.cpp:138–157  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

136}
137
138bool TEnginePlugin::LoadPlugin(const std::string& name)
139{
140 HandlerManager* hm = GetHandlerManager();
141
142 std::string fullname;
143 ShareLibParser* p = new ShareLibParser();
144
145 if(!GetFullName(name, fullname))
146 return false;
147
148 if(!fullname.size() || p->Load(fullname) < 0)
149 {
150 LOG_ERROR() << "Failed in loading the plugin!\n";
151 return false;
152 }
153
154 hm->SetAttr(name, ShareLibParserPtr(p));
155 LOG_INFO() << "Successfully load plugin : " << fullname << "\n";
156 return true;
157}
158
159bool TEnginePlugin::InitPlugin(const std::string& name)
160{

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
LoadMethod · 0.45
SetAttrMethod · 0.45

Tested by

no test coverage detected