本文整理汇总了C++中MetadataLookupList::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ MetadataLookupList::begin方法的具体用法?C++ MetadataLookupList::begin怎么用?C++ MetadataLookupList::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MetadataLookupList
的用法示例。
在下文中一共展示了MetadataLookupList::begin方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dumpAllLookups
void dumpAllLookups(RetsMetadata * metadata, MetadataResource * resource)
{
string resourceName = resource->GetResourceID();
MetadataLookupList classes =
metadata->GetAllLookups(resourceName);
MetadataLookupList::iterator i;
for (i = classes.begin(); i != classes.end(); i++)
{
MetadataLookup * lookup = *i;
cout << "Resource name: " << resourceName << " ["
<< resource->GetStandardName() << "]" << endl;
cout << "Lookup name: " << lookup->GetLookupName() << " ("
<< lookup->GetVisibleName() << ")";
if (!lookup->GetMetadataEntryID().empty())
{
cout << " MetadataEntryID: " << lookup->GetMetadataEntryID();
}
cout << endl;
dumpAllLookupTypes(metadata, lookup);
cout << endl;
}
}
示例2: findBestMatch
bool MetadataDownload::findBestMatch(MetadataLookupList list,
QString originaltitle)
{
QStringList titles;
// Build a list of all the titles
for (MetadataLookupList::const_iterator i = list.begin();
i != list.end(); ++i)
{
titles.append((*i)->GetTitle());
}
// Apply Levenshtein distance algorithm to determine closest match
QString bestTitle = nearestName(originaltitle, titles);
// If no "best" was chosen, give up.
if (bestTitle.isEmpty())
{
LOG(VB_GENERAL, LOG_ERR,
QString("No adequate match or multiple "
"matches found for %1. Update manually.")
.arg(originaltitle));
return false;
}
LOG(VB_GENERAL, LOG_INFO, QString("Best Title Match For %1: %2")
.arg(originaltitle).arg(bestTitle));
// Grab the one item that matches the besttitle (IMPERFECT)
for (MetadataLookupList::const_iterator i = list.begin();
i != list.end(); ++i)
{
if ((*i)->GetTitle() == bestTitle)
{
MetadataLookup *newlookup = (*i);
newlookup->SetStep(kLookupData);
prependLookup(newlookup);
return true;
}
}
return false;
}
示例3: CreateMetadataXML
QDomDocument CreateMetadataXML(MetadataLookupList list)
{
QDomDocument doc("MythMetadataXML");
QDomElement root = doc.createElement("metadata");
doc.appendChild(root);
for (MetadataLookupList::const_iterator i = list.begin();
i != list.end(); ++i)
{
CreateMetadataXMLItem(*i, root, doc);
}
return doc;
}