本文整理汇总了C++中Component::GetFuncSet方法的典型用法代码示例。如果您正苦于以下问题:C++ Component::GetFuncSet方法的具体用法?C++ Component::GetFuncSet怎么用?C++ Component::GetFuncSet使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Component
的用法示例。
在下文中一共展示了Component::GetFuncSet方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetFuncSet
int ASI::GetFuncSet(CRef& cref, const QString& uuid)
{
int funcSet = -1;
Component* pComponent = cref.GetInstance();
if (pComponent != NULL)
{
funcSet = pComponent->GetFuncSet(uuid);
cref.ReleaseInstance();
}
return funcSet;
}
示例2: RemoveFromLayout
void ASI::RemoveFromLayout(CRef& cref, CRef& layout)
{
Component* pLayoutComponent = layout.GetInstance();
if (pLayoutComponent != NULL)
{
int funcSet = pLayoutComponent->GetFuncSet("{f742f223-bb7b-48f0-92a8-81702e14de16}");
int emitter = pLayoutComponent->GetEmitter("{b11a0db4-cb96-4bf6-9631-fd96f20ea6ab}");
int receiver = pLayoutComponent->GetReceiver("{6a7ab00f-1ab4-4324-9eb4-e614bfca4a16}");
if ((funcSet != -1) &&
(emitter != -1) &&
(receiver != -1))
{
Component* pComponent = cref.GetInstance();
if (pComponent != NULL)
{
if (pComponent->m_pData->inLayout &&
IsParent(pLayoutComponent, pComponent))
{
/*
* Tell the layout component to remove
* the item with the given CRef id.
*/
DRef dref = NewData(BOI_STD_D(Int));
*dref.GetWriteInstance<int>() = cref.Id();
pLayoutComponent->CallFunc(funcSet, 2, dref, true);
DisconnectFromReceiver(pLayoutComponent, emitter, cref);
DisconnectFromReceiver(pComponent, BOI_STD_E(ParentBoundingBox), layout);
pComponent->m_pData->inLayout = false;
CRef invalidCRef;
pComponent->SetParent(invalidCRef);
}
cref.ReleaseInstance();
}
}
layout.ReleaseInstance();
}
}
示例3: AddToLayout
void ASI::AddToLayout(CRef& cref, CRef& layout)
{
Component* pLayoutComponent = layout.GetInstance();
if (pLayoutComponent != NULL)
{
int funcSet = pLayoutComponent->GetFuncSet("{f742f223-bb7b-48f0-92a8-81702e14de16}");
int emitter = pLayoutComponent->GetEmitter("{b11a0db4-cb96-4bf6-9631-fd96f20ea6ab}");
int receiver = pLayoutComponent->GetReceiver("{6a7ab00f-1ab4-4324-9eb4-e614bfca4a16}");
if ((funcSet != -1) &&
(emitter != -1) &&
(receiver != -1))
{
Component* pComponent = cref.GetInstance();
if (pComponent != NULL)
{
if ((!pComponent->m_pData->inLayout) &&
(pComponent != pLayoutComponent))
{
pComponent->SetParent(layout);
/*
* Tell the layout component to add
* a new item with the given CRef id.
*/
DRef dref = NewData(BOI_STD_D(Int));
*dref.GetWriteInstance<int>() = cref.Id();
pLayoutComponent->CallFunc(funcSet, 1, dref, true);
ConnectToReceiver(pLayoutComponent, emitter, cref, BOI_STD_R(SetPosition));
ConnectToReceiver(pComponent, BOI_STD_E(ParentBoundingBox), layout, receiver);
pComponent->m_pData->inLayout = true;
}
cref.ReleaseInstance();
}
}
layout.ReleaseInstance();
}
}