| 136 | } |
| 137 | |
| 138 | bool 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 | |
| 159 | bool TEnginePlugin::InitPlugin(const std::string& name) |
| 160 | { |