• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ gcRefPtr类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中gcRefPtr的典型用法代码示例。如果您正苦于以下问题:C++ gcRefPtr类的具体用法?C++ gcRefPtr怎么用?C++ gcRefPtr使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了gcRefPtr类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: getMcfPath

gcString MCFManager::getMcfPath(gcRefPtr<UserCore::Item::ItemInfoI> item, bool isUnAuthed)
{
	if (!item || !item->getCurrentBranch())
		return "";

	return getMcfPath(item->getId(), item->getCurrentBranch()->getBranchId(), item->getInstalledBuild(), isUnAuthed);
}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:7,代码来源:McfManager.cpp


示例2: selectBranch

bool InstalledWizardThread::selectBranch(gcRefPtr<UserCore::Item::ItemInfoI> &item)
{
	std::vector<uint32> vBranchIdList;

	for (uint32 x=0; x<item->getBranchCount(); x++)
	{
		auto bi = item->getBranch(x);

		if (!bi)
			continue;

		uint32 flags = bi->getFlags();

		if (HasAnyFlags(flags, UserCore::Item::BranchInfoI::BF_NORELEASES|UserCore::Item::BranchInfoI::BF_DEMO|UserCore::Item::BranchInfoI::BF_TEST))
			continue;

		if (!HasAllFlags(flags, UserCore::Item::BranchInfoI::BF_ONACCOUNT))
		{
			if (HasAnyFlags(flags, (UserCore::Item::BranchInfoI::BF_MEMBERLOCK|UserCore::Item::BranchInfoI::BF_REGIONLOCK)))
				continue;
		}

		if (!HasAllFlags(flags, UserCore::Item::BranchInfoI::BF_ONACCOUNT) && !(HasAllFlags(flags, UserCore::Item::BranchInfoI::BF_FREE)))
			continue;

		vBranchIdList.push_back(bi->getBranchId());
	}

	if (vBranchIdList.size() == 0)
		return false;

	//select the first free branch
	item->setInstalledMcf(MCFBranch::BranchFromInt(vBranchIdList[0]));
	return true;
}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:35,代码来源:InstalledWizardThread.cpp


示例3: GetUserCore

void GameDiskForm::setInfo(DesuraId id, gcRefPtr<UserCore::ItemManagerI> pItemManager)
{
	if (!pItemManager)
		pItemManager = GetUserCore()->getItemManager();

	m_pItem = pItemManager->findItemInfo(id);

	if (!m_pItem)
	{
		Close();
		return;
	}

	gcRefPtr<UserCore::Item::ItemInfoI> parent = m_pItem;

	if (m_pItem->getId().getType() == DesuraId::TYPE_MOD && m_pItem->getParentId().isOk())
		parent = pItemManager->findItemInfo(m_pItem->getParentId());

	if (!parent)
		parent = m_pItem;

	SetTitle(gcWString(Managers::GetString(L"#GD_TITLE"), m_pItem->getName()));

	m_labInfo->SetLabel(gcWString(Managers::GetString(L"#GD_INFO"), m_pItem->getName(), parent->getName()));
	m_labInfo->Wrap( 360 );
}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:26,代码来源:GameDiscForm.cpp


示例4: setUpThread

void UserThreadManager::setUpThread(gcRefPtr<UserCore::Thread::MCFThreadI> thread)
{
	auto um = m_pUserCore->getUploadManager();

	thread->setThreadManager(gcRefPtr<UserThreadManager>(this));
	thread->setUpLoadManager(um);
	thread->setWebCore(m_pUserCore->getWebCore());
	thread->setUserCore(m_pUserCore);
}
开发者ID:aromis,项目名称:desura-app,代码行数:9,代码来源:UserThreadManager.cpp


示例5: toolId

void ToolManager::addJSTool(gcRefPtr<UserCore::Item::ItemInfo> item, uint32 branchId, gcString name, gcString exe, gcString args, gcString res)
{
	if (!item)
		return;

	auto branch = item->getBranchById(branchId);

	if (!branch)
		return;

	auto realBranch = gcRefPtr<UserCore::Item::BranchInfo>::dyn_cast(branch);

	if (!realBranch)
		return;

	bool found = false;


	gcRefPtr<JSToolInfo> jsinfo;

	BaseManager<ToolInfo>::for_each([&](gcRefPtr<ToolInfo> info)
	{
		auto temp = gcRefPtr<JSToolInfo>::dyn_cast(info);

		if (!temp)
			return;

		if (item->getId() == temp->getItemId() && name == info->getName() && temp->getBranchId() == branchId)
		{
			jsinfo = temp;
			found = true;
		}
	});

	if (found)
	{
		if (!jsinfo->isRealyInstalled())
			jsinfo->setExePath(exe.c_str());

		return;
	}


	DesuraId toolId(m_iLastCustomToolId, DesuraId::TYPE_TOOL);
	m_iLastCustomToolId--;

	auto tool = gcRefPtr<JSToolInfo>::create(item->getId(), realBranch->getBranchId(), toolId, name, exe, args, res);
	realBranch->addJSTool(toolId);
	addItem(tool);
}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:50,代码来源:ToolManager_Script.cpp


示例6: setInfo

void ChangeLogForm::setInfo(gcRefPtr<UserCore::Item::ItemInfoI> item)
{
	if (!item)
		return;

	if (item->getIcon() && UTIL::FS::isValidFile(UTIL::FS::PathWithFile(item->getIcon())))
		setIcon(item->getIcon());

	m_uiItemId = item->getId();

	gcWString title(Managers::GetString(L"#CL_TITLE"), item->getName());
	SetTitle(title);

	gcWString type = gcWString(m_uiItemId.getTypeString());
	gcWString shortName(item->getShortName());

	gcWString url(L"{0}/{1}/{2}/changelog", GetWebCore()->getUrl(WebCore::Root), type, shortName);

	if (item->getCurrentBranch())
		url += gcWString(L"/{0}", item->getCurrentBranch()->getBranchId());

	m_ieBrowser->loadUrl(url);

#ifdef NIX
	Refresh(false);
#endif
}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:27,代码来源:ChangeLogForm.cpp


示例7: GetUserCore

gcRefPtr<UserCore::Item::ItemInfoI> DesuraJSUploadInfo::getItem(gcRefPtr<UserCore::Misc::UploadInfoThreadI> upload)
{
	if (!GetUserCore() || !GetUserCore()->getItemManager())
		return nullptr;

	return GetUserCore()->getItemManager()->findItemInfo(upload->getItemId());
}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:7,代码来源:gcJSUploads.cpp


示例8: GetWebCore

gcRefPtr<WebCore::WebCoreI> GetWebCore()
{
	if (g_pUserHandle)
		return g_pUserHandle->getWebCore();

	return nullptr;
}
开发者ID:leayle2a,项目名称:desura-app,代码行数:7,代码来源:MainApp.cpp


示例9: setInfo

void LaunchItemDialog::setInfo(gcRefPtr<UserCore::Item::ItemInfoI> item)
{
	if (!item)
	{
		Close();
		return;
	}

	if (item->getIcon() && UTIL::FS::isValidFile(UTIL::FS::PathWithFile(item->getIcon())))
		setIcon(item->getIcon());

	m_uiInternId = item->getId();

	m_labItemName->SetLabel(gcWString(Managers::GetString(L"#LI_LABEL"), m_uiInternId.getTypeString(), item->getName()));
	SetTitle(gcWString(L"{0} {1}..", Managers::GetString(L"#LAUNCH"), item->getName()));
}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:16,代码来源:LaunchPrompt.cpp


示例10: extractInstallChecks

void BranchInstallInfo::extractInstallChecks(const XML::gcXMLElement &icsNode, gcRefPtr<WildcardManager> &pWildCard, std::vector<InsCheck> &vInsChecks)
{
	icsNode.for_each_child("installlocation", [&vInsChecks, pWildCard, this](const XML::gcXMLElement &icNode)
	{
		const gcString iCheck = icNode.GetChild("check");
		const gcString iPath = icNode.GetChild("path");

		if (iCheck.empty() || iPath.empty())
			return;

		try
		{
			gcString strCheckRes = pWildCard->constructPath(iCheck.c_str());

			if (isInstalled())
			{
				if (!updateInstallCheck(strCheckRes, iPath))
					return;

				vInsChecks.push_back(InsCheck(strCheckRes.c_str(), m_szPath.c_str()));
			}
			else
			{
				vInsChecks.push_back(InsCheck(strCheckRes.c_str(), iPath.c_str()));
			}
		}
		catch (...)
		{
		}
	});
}
开发者ID:aromis,项目名称:desura-app,代码行数:31,代码来源:BranchInstallInfo.cpp


示例11:

BranchInstallInfo::BranchInstallInfo(uint32 biId, gcRefPtr<BranchItemInfoI> itemInfo, UTIL::FS::UtilFSI* pFileSystem)
	: m_BiId(biId)
	, m_pItem(itemInfo)
	, m_ItemId(itemInfo->getId())
	, m_uiInstallSize(0)
	, m_uiDownloadSize(0)
	, m_pFileSystem(pFileSystem)
{
}
开发者ID:aromis,项目名称:desura-app,代码行数:9,代码来源:BranchInstallInfo.cpp


示例12: getItemManager

std::vector<gcRefPtr<UserCore::Item::ItemInfoI>> DesuraJSBinding::getMods(gcRefPtr<UserCore::Item::ItemInfoI> game)
{
	auto im = getItemManager();

	if (!game || !im)
		return std::vector<gcRefPtr<UserCore::Item::ItemInfoI>>();

	std::vector<gcRefPtr<UserCore::Item::ItemInfoI>> mList;
	im->getModList(game->getId(), mList);
	return mList;
}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:11,代码来源:gcJSBinding.cpp


示例13: onItemFound

void InstalledWizardThread::onItemFound(gcRefPtr<UserCore::Item::ItemInfoI> &item)
{
	bool verify = (item->isInstalled() && item->isDownloadable() && !(item->getStatus()&UserCore::Item::ItemInfoI::STATUS_LINK));

	if (verify)
	{
		if (!m_pTaskGroup)
		{
			auto im = gcRefPtr<UserCore::ItemManager>::dyn_cast(getUserCore()->getItemManager());
			gcAssert(im);
			m_pTaskGroup = im->newTaskGroup(UserCore::Item::ItemTaskGroupI::A_VERIFY);
			m_pTaskGroup->start();
		}

		item->addSFlag(UserCore::Item::ItemInfoI::STATUS_ONCOMPUTER|UserCore::Item::ItemInfoI::STATUS_VERIFING);

		auto handle = getUserCore()->getItemManager()->findItemHandle(item->getId());
		handle->setPauseOnError(true);

		m_pTaskGroup->addItem(item);
	}

	DesuraId id = item->getId();
	onItemFoundEvent(id);
}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:25,代码来源:InstalledWizardThread.cpp


示例14: exploreMcf

void DesuraJSUploadInfo::exploreMcf(gcRefPtr<UserCore::Misc::UploadInfoThreadI> upload)
{
	const char* file = upload->getFile();

	if (file)
	{
		UTIL::FS::Path path(file, "", true);
#ifdef WIN32
		ShellExecuteA(nullptr, "explore" , path.getFolderPath().c_str(), nullptr, nullptr, SW_SHOWNORMAL);
#else
		UTIL::LIN::launchFolder(path.getFolderPath().c_str());
#endif
	}
}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:14,代码来源:gcJSUploads.cpp


示例15: getBranchId

gcString DesuraJSBranchInfo::getBranchId(gcRefPtr<UserCore::Item::BranchInfoI> branch)
{
	return gcString("{0}", branch->getBranchId());
}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:4,代码来源:gcJSBranchInfo.cpp


示例16: getBranchCost

gcString DesuraJSBranchInfo::getBranchCost(gcRefPtr<UserCore::Item::BranchInfoI> branch)
{
	return branch->getCost();
}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:4,代码来源:gcJSBranchInfo.cpp


示例17: getItemId

gcString DesuraJSUploadInfo::getItemId(gcRefPtr<UserCore::Misc::UploadInfoThreadI> upload)
{
	return upload->getItemId().toString();
}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:4,代码来源:gcJSUploads.cpp


示例18: setDeleteMcf

void DesuraJSUploadInfo::setDeleteMcf(gcRefPtr<UserCore::Misc::UploadInfoThreadI> upload, bool del)
{
	upload->setDelMcf(del);
}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:4,代码来源:gcJSUploads.cpp


示例19: getFileName

gcString DesuraJSUploadInfo::getFileName(gcRefPtr<UserCore::Misc::UploadInfoThreadI> upload)
{
	UTIL::FS::Path path = UTIL::FS::PathWithFile(upload->getFile());
	return path.getFile().getFile();
}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:5,代码来源:gcJSUploads.cpp


示例20: hasStarted

bool DesuraJSUploadInfo::hasStarted(gcRefPtr<UserCore::Misc::UploadInfoThreadI> upload)
{
	return upload->hasStarted();
}
开发者ID:EasyCoding,项目名称:desura-app,代码行数:4,代码来源:gcJSUploads.cpp



注:本文中的gcRefPtr类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ gcString类代码示例发布时间:2022-05-31
下一篇:
C++ gc类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap