本文整理汇总了C++中Plugin::Name方法的典型用法代码示例。如果您正苦于以下问题:C++ Plugin::Name方法的具体用法?C++ Plugin::Name怎么用?C++ Plugin::Name使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Plugin
的用法示例。
在下文中一共展示了Plugin::Name方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dropPlugins
void PluginsManager::dropPlugins(){
DEBUG_LOW_LEVEL << Q_FUNC_INFO;
//cleanAll();
for(QMap<QString, Plugin*>::iterator it = _plugins.begin(); it != _plugins.end(); ++it){
Plugin* p = it.value();
QString name = p->Name();
p->Stop();
delete p;
}
_plugins.clear();
}
示例2: ilexicographical_compare
bool Plugin::operator < (const Plugin & rhs) const {
return boost::ilexicographical_compare(Name(), rhs.Name());;
}
示例3: WritePlugin
void WritePlugin(YAML::Emitter& out, const Plugin& plugin, const Game& game) {
out << YAML::BeginMap;
out << YAML::Key << "name"
<< YAML::Value << plugin.Name();
out << YAML::Key << "isActive";
if (game.IsActive(plugin.Name()))
out << YAML::Value << true;
else
out << YAML::Value << false;
if (plugin.Crc() != 0) {
out << YAML::Key << "crc"
<< YAML::Value << IntToHexString(plugin.Crc());
}
if (!plugin.Version().empty()) {
out << YAML::Key << "version"
<< YAML::Value << boost::locale::translate("Version").str() + ": " + plugin.Version();
}
std::set<Tag> tags = plugin.Tags();
std::set<Tag> tagsAdd, tagsRemove;
if (!tags.empty()) {
for (std::set<Tag>::const_iterator it = tags.begin(), endit = tags.end(); it != endit; ++it) {
if (it->IsAddition())
tagsAdd.insert(*it);
else
tagsRemove.insert(*it);
}
if (!tagsAdd.empty()) {
out << YAML::Key << "tagsAdd"
<< YAML::Value << tagsAdd;
}
if (!tagsRemove.empty()) {
out << YAML::Key << "tagsRemove"
<< YAML::Value << tagsRemove;
}
}
std::list<Message> messages = plugin.Messages();
std::set<PluginDirtyInfo> dirtyInfo = plugin.DirtyInfo();
for (std::set<PluginDirtyInfo>::const_iterator it = dirtyInfo.begin(), endit = dirtyInfo.end(); it != endit; ++it) {
boost::format f;
if (it->ITMs() > 0 && it->UDRs() > 0 && it->DeletedNavmeshes() > 0)
f = boost::format(boost::locale::translate("Contains %1% ITM records, %2% UDR records and %3% deleted navmeshes. Clean with %4%.")) % it->ITMs() % it->UDRs() % it->DeletedNavmeshes() % it->CleaningUtility();
else if (it->ITMs() == 0 && it->UDRs() == 0 && it->DeletedNavmeshes() == 0)
f = boost::format(boost::locale::translate("Clean with %1%.")) % it->CleaningUtility();
else if (it->ITMs() == 0 && it->UDRs() > 0 && it->DeletedNavmeshes() > 0)
f = boost::format(boost::locale::translate("Contains %1% UDR records and %2% deleted navmeshes. Clean with %3%.")) % it->UDRs() % it->DeletedNavmeshes() % it->CleaningUtility();
else if (it->ITMs() == 0 && it->UDRs() == 0 && it->DeletedNavmeshes() > 0)
f = boost::format(boost::locale::translate("Contains %1% deleted navmeshes. Clean with %2%.")) % it->DeletedNavmeshes() % it->CleaningUtility();
else if (it->ITMs() == 0 && it->UDRs() > 0 && it->DeletedNavmeshes() == 0)
f = boost::format(boost::locale::translate("Contains %1% UDR records. Clean with %2%.")) % it->UDRs() % it->CleaningUtility();
else if (it->ITMs() > 0 && it->UDRs() == 0 && it->DeletedNavmeshes() > 0)
f = boost::format(boost::locale::translate("Contains %1% ITM records and %2% deleted navmeshes. Clean with %3%.")) % it->ITMs() % it->DeletedNavmeshes() % it->CleaningUtility();
else if (it->ITMs() > 0 && it->UDRs() == 0 && it->DeletedNavmeshes() == 0)
f = boost::format(boost::locale::translate("Contains %1% ITM records. Clean with %2%.")) % it->ITMs() % it->CleaningUtility();
else if (it->ITMs() > 0 && it->UDRs() > 0 && it->DeletedNavmeshes() == 0)
f = boost::format(boost::locale::translate("Contains %1% ITM records and %2% UDR records. Clean with %3%.")) % it->ITMs() % it->UDRs() % it->CleaningUtility();
messages.push_back(loot::Message(loot::Message::warn, f.str()));
}
if (!messages.empty()) {
out << YAML::Key << "messages"
<< YAML::Value << YAML::BeginSeq;
for (std::list<Message>::const_iterator it = messages.begin(), endit = messages.end(); it != endit; ++it) {
WriteMessage(out, *it);
}
out << YAML::EndSeq;
}
out << YAML::EndMap;
}