本文整理汇总了C++中std::shared_ptr::ChangeLog方法的典型用法代码示例。如果您正苦于以下问题:C++ shared_ptr::ChangeLog方法的具体用法?C++ shared_ptr::ChangeLog怎么用?C++ shared_ptr::ChangeLog使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类std::shared_ptr
的用法示例。
在下文中一共展示了shared_ptr::ChangeLog方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetLabel
bool CAddonsGUIInfo::GetLabel(std::string& value, const CFileItem *item, int contextWindow, const CGUIInfo &info, std::string *fallback) const
{
const std::shared_ptr<const ADDON::IAddon> addonInfo = item->GetAddonInfo();
if (addonInfo)
{
switch (info.m_info)
{
///////////////////////////////////////////////////////////////////////////////////////////////
// LISTITEM_*
///////////////////////////////////////////////////////////////////////////////////////////////
case LISTITEM_ADDON_NAME:
value = addonInfo->Name();
return true;
case LISTITEM_ADDON_VERSION:
value = addonInfo->Version().asString();
return true;
case LISTITEM_ADDON_CREATOR:
value = addonInfo->Author();
return true;
case LISTITEM_ADDON_SUMMARY:
value = addonInfo->Summary();
return true;
case LISTITEM_ADDON_DESCRIPTION:
value = addonInfo->Description();
return true;
case LISTITEM_ADDON_DISCLAIMER:
value = addonInfo->Disclaimer();
return true;
case LISTITEM_ADDON_NEWS:
value = addonInfo->ChangeLog();
return true;
case LISTITEM_ADDON_BROKEN:
value = addonInfo->Broken();
return true;
case LISTITEM_ADDON_TYPE:
value = ADDON::CAddonInfo::TranslateType(addonInfo->Type(), true);
return true;
case LISTITEM_ADDON_INSTALL_DATE:
value = addonInfo->InstallDate().GetAsLocalizedDateTime();
return true;
case LISTITEM_ADDON_LAST_UPDATED:
if (addonInfo->LastUpdated().IsValid())
{
value = addonInfo->LastUpdated().GetAsLocalizedDateTime();
return true;
}
break;
case LISTITEM_ADDON_LAST_USED:
if (addonInfo->LastUsed().IsValid())
{
value = addonInfo->LastUsed().GetAsLocalizedDateTime();
return true;
}
break;
case LISTITEM_ADDON_ORIGIN:
{
if (item->GetAddonInfo()->Origin() == ADDON::ORIGIN_SYSTEM)
{
value = g_localizeStrings.Get(24992);
return true;
}
ADDON::AddonPtr origin;
if (CServiceBroker::GetAddonMgr().GetAddon(item->GetAddonInfo()->Origin(), origin, ADDON::ADDON_UNKNOWN, false))
{
value = origin->Name();
return true;
}
value = g_localizeStrings.Get(13205);
return true;
}
case LISTITEM_ADDON_SIZE:
{
uint64_t packageSize = item->GetAddonInfo()->PackageSize();
if (packageSize > 0)
{
value = StringUtils::FormatFileSize(packageSize);
return true;
}
break;
}
}
}
switch (info.m_info)
{
///////////////////////////////////////////////////////////////////////////////////////////////
// SYSTEM_*
///////////////////////////////////////////////////////////////////////////////////////////////
case SYSTEM_ADDON_TITLE:
case SYSTEM_ADDON_ICON:
case SYSTEM_ADDON_VERSION:
{
// This logic does not check/care whether an addon has been disabled/marked as broken,
// it simply retrieves it's name or icon that means if an addon is placed on the home screen it
// will stay there even if it's disabled/marked as broken. This might need to be changed/fixed
// in the future.
ADDON::AddonPtr addon;
if (!info.GetData3().empty())
{
CServiceBroker::GetAddonMgr().GetAddon(info.GetData3(), addon, ADDON::ADDON_UNKNOWN, false);
//.........这里部分代码省略.........