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

Method SetPlugin

core/lib/tengine_plugin.cpp:85–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void TEnginePlugin::SetPlugin(const std::string& key, const std::string& value)
86{
87 NameManager* nm = GetNameManager();
88 InitManager* im = GetInitManager();
89 PrioManager* pm = GetPrioManager();
90
91 std::vector<std::string> subkey;
92
93 subkey = TEngineConfig::ParseKey(key);
94 if(subkey.size() > 2 && subkey.at(0) == "plugin")
95 {
96 if(subkey.at(2) == "so")
97 {
98 nm->SetAttr(subkey.at(1), value);
99 }
100 else if(subkey.at(2) == "init")
101 {
102 im->SetAttr(subkey.at(1), value);
103 }
104 else if(subkey.at(2) == "prio")
105 {
106 int prio = strtoul(value.c_str(), NULL, 10);
107 (*pm)[prio] = subkey.at(1);
108 }
109 }
110}
111
112bool TEnginePlugin::LoadAll(void)
113{

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.45
SetAttrMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected