本文整理汇总了C++中GetLink函数的典型用法代码示例。如果您正苦于以下问题:C++ GetLink函数的具体用法?C++ GetLink怎么用?C++ GetLink使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetLink函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: sizeof
// Initialize -- Initialize Block Heap Manager ---------------------CHeapBlock-
//
// Free Block in heap:
// {<sizePrev/sizeNext/signPrev/signNext><<FreeLinks> data >}
//
// Allocated Block in heap:
// {<sizePrev/sizeNext/signPrev/signNext>< data >}
//
// The Heap is as follows:
// <sizePrev=0/sizeOf1st=n/SIGNEND/signOf1st> <data block 1> ...
// ... <data block N> <0/sizeOfN/signOfN/SIGNEND>
//
// All <data> is allocated to fall on the ALIGNSIZE byte boundry.
//
// pFree -> {1st free block}
// pAlloc-> {1st allocated block}
//
// NOTE: Block sizes must ALWAYS be valid except in critical regions
//
ERC CHeapBlock::Initialize(U32 nFragment, U32 aP[], U32 aCb[], U16 sUnit)
{
sUnit_ = sUnit + (ALIGNSIZE - 1) & ~ALIGNMASK;
sSplit_= sUnit + sizeof(BLKHEAD);
// This code assumes the heap is at least large enough for three headers
// Make block marking beginning of heap
pHeap_ = (BLKHEAD *)( (aP[0] + ALIGNMASK) & ~ALIGNMASK );
pHeap_->sPrev = 0; // End Block Marker
pHeap_->sThis = 0;
pHeap_->tThis = TYPEEND;
pHeap_->pThis = this;
// Remove 1st header from fragment for loop
aCb[0] = aCb[0] - ((int)(pHeap_+1) - (int)aP[0]);
aP[0] = (U32)(pHeap_+1);
pFree_ = (BLKHEAD*)aP[0]; // 1st free block
// Add fragments to the free list
U32 sPrev = 0; // First Free Block
BLKHEAD *pPrev = NULL;
for (int iFragment=0; iFragment < nFragment; iFragment++) {
// Enter fragment as a free block
BLKHEAD *pFrag = (BLKHEAD *)( (aP[iFragment] + ALIGNMASK) & ~ALIGNMASK );
// Reduce size of fragment by amount pFrag was rounded up
U32 sThis = aCb[iFragment] - ((int)pFrag - (int)aP[iFragment]);
pFrag->sPrev = sPrev;
pFrag->sThis = sThis - sizeof(BLKHEAD)*2;
pFrag->tThis = TYPEFREE;
pFrag->pThis = this;
// Link this free block on the free list
GetLink(pFrag)->pNextFree = NULL;
GetLink(pFrag)->pPrevFree = pPrev;
if (pPrev)
GetLink(pPrev)->pNextFree = pFrag;
// Enter gap between fragments as 'inuse' block, except last one which is end block
GetNext(pFrag)->sPrev = pFrag->sThis;
if (iFragment+1 < nFragment) {
BLKHEAD *pNext = (BLKHEAD *)( (aP[iFragment+1] + ALIGNMASK) & ~ALIGNMASK );
GetNext(pFrag)->sThis = (int)pNext - (int)(GetNext(pFrag)+1);
GetNext(pFrag)->tThis = TYPEALLOC;
}
else {
GetNext(pFrag)->sThis = 0; // End Block Marker
GetNext(pFrag)->tThis = TYPEEND;
}
GetNext(pFrag)->pThis = this;
pPrev = pFrag;
sPrev = pFrag->sThis;
}
return OK;
}
开发者ID:JoeAltmaier,项目名称:Odyssey,代码行数:78,代码来源:HeapBlock.cpp
示例2: GetLink
// _Link -- Link block to free list --------------------------------CHeapBlock-
//
void CHeapBlock::_Link(BLKHEAD *pBlk)
{
Critical section;
GetLink(pBlk)->pPrevFree = NULL;
GetLink(pBlk)->pNextFree = pFree_;
if (pFree_ != NULL)
GetLink(pFree_)->pPrevFree = pBlk;
pFree_ = pBlk;
}
开发者ID:JoeAltmaier,项目名称:Odyssey,代码行数:14,代码来源:HeapBlock.cpp
示例3: IsParent
//------------------------------------------------------------------------------
bool CUIEdProjectUI::IsParent(CIwAttrInstance* inst,CIwAttrInstance* parent)
{
CUIEdAttrLinkData* link=GetLink(inst);
CUIEdAttrLinkData* parentLink=GetLink(parent);
if (link==NULL || parentLink==NULL) return false;
for (; parentLink!=NULL; parentLink=parentLink->m_Parent)
{
if (link==parentLink)
return true;
}
return false;
}
开发者ID:SamanthaClark,项目名称:UI-Builder,代码行数:15,代码来源:IwUIEdProjectUI.cpp
示例4:
/*! see CMultiXSession::CheckStatus
*/
bool CMultiplexerClientFEClientSession::CheckStatus()
{
if(GetLink() == NULL)
Kill();
// by returning true we will disable the deletion of the session based on Idle timer
return true;
}
开发者ID:bmanojlovic,项目名称:bforce8583,代码行数:9,代码来源:MultiplexerClientFEClientSession.cpp
示例5: GetLink
CMultiXLayer::EventHandlerReturn CMultiXL3::OnAcceptCompleted(CMultiXEvent &Event)
{
CMultiXL2Event *Ev = (CMultiXL2Event *)&Event;
CMultiXL3Link *Link = GetLink(Ev->L2LinkID());
if(Link == NULL)
{
CMultiXL2CloseReq L2Req(this,LowerLayer());
L2Req.m_L2LinkID = Ev->NewL2LinkID();
LowerLayer()->RequestHandler(L2Req);
} else
{
if(Ev->IoError())
{
CMultiXL2CloseReq L2Req(this,LowerLayer());
L2Req.m_L2LinkID = Link->m_L2LinkID;
LowerLayer()->RequestHandler(L2Req);
} else
{
CMultiXL3Link *NewLink = CreateLink(Ev->NewL2LinkID());
NewLink->OnAcceptCompleted(*Link);
}
}
return CMultiXLayer::DeleteEvent;
}
开发者ID:bmanojlovic,项目名称:bforce8583,代码行数:25,代码来源:MultiXL3.cpp
示例6: wxCHECK_RET
void wxHtmlCell::OnMouseClick(wxWindow *, int, int, const wxMouseEvent& event)
{
wxCHECK_RET( gs_helperOnMouseClick, wxT("unexpected call to OnMouseClick") );
wxHtmlWindowInterface *window = gs_helperOnMouseClick->window;
const wxPoint& pos = gs_helperOnMouseClick->pos;
#endif // WXWIN_COMPATIBILITY_2_6
wxHtmlLinkInfo *lnk = GetLink(pos.x, pos.y);
bool retval = false;
if (lnk)
{
wxHtmlLinkInfo lnk2(*lnk);
lnk2.SetEvent(&event);
lnk2.SetHtmlCell(this);
window->OnHTMLLinkClicked(lnk2);
retval = true;
}
#if WXWIN_COMPATIBILITY_2_6
gs_helperOnMouseClick->retval = retval;
#else
return retval;
#endif // WXWIN_COMPATIBILITY_2_6
}
开发者ID:CyberIntelMafia,项目名称:clamav-devel,代码行数:26,代码来源:htmlcell.cpp
示例7: DebugPrint
/*!
see CMultiXSession::OnSendMsgFailed
We notify the associated link that the last message received from the POS terminal
was not processed succefuly by the server application.
*/
void CMultiplexerClientFEClientSession::OnSendMsgFailed(CMultiXAppMsg &OriginalMsg)
{
DebugPrint(2,"Send Msg Failed\n");
CMultiplexerClientFELink *pLink = GetLink();
if(pLink)
pLink->OnSessionSendFailed(OriginalMsg,ErrUnableToForwardMsg);
}
开发者ID:bmanojlovic,项目名称:bforce8583,代码行数:12,代码来源:MultiplexerClientFEClientSession.cpp
示例8: GetMinimizedHeight
int Track::GetMinimizedHeight() const
{
if (GetLink()) {
return 20;
}
return 40;
}
开发者ID:ScorpioJonesy,项目名称:audacity,代码行数:8,代码来源:Track.cpp
示例9: GetLink
NS_IMETHODIMP
HTMLBodyElement::GetLink(nsAString& aLink)
{
nsString link;
GetLink(link);
aLink = link;
return NS_OK;
}
开发者ID:cabelitos,项目名称:mozilla-central,代码行数:8,代码来源:HTMLBodyElement.cpp
示例10: GetLink
NS_IMETHODIMP
HTMLBodyElement::GetLink(nsAString& aLink)
{
DOMString link;
GetLink(link);
link.ToString(aLink);
return NS_OK;
}
开发者ID:MekliCZ,项目名称:positron,代码行数:8,代码来源:HTMLBodyElement.cpp
示例11: BuildAddress
void
CMLineAddressTable::SetExecutionPoint
(
const JIndex lineIndex
)
{
const JString addr = BuildAddress(*(itsLineTextList->GetElement(lineIndex)));
GetLink()->SetExecutionPoint(addr);
}
开发者ID:jafl,项目名称:jx_application_framework,代码行数:9,代码来源:CMLineAddressTable.cpp
示例12: GetLink
TBool CMccControllerStub::StreamsExists( TUint32 aSessionId,
TUint32 aLinkId )
{
TLink link;
link.iSessionID = aSessionId;
link.iLinkID = aLinkId;
return iStreamExists == -1 ? GetLink( link ).iStreams > 0 : iStreamExists == 1;
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:9,代码来源:CMCCController_stub.cpp
示例13: GetPointPos
Image RichTextView::CursorImage(Point p, dword keyflags)
{
int pos = GetPointPos(p);
if(WhenLink && pos >= 0 && !IsNull(GetLink(pos, p)))
return CtrlImg::HandCursor();
if(HasCapture())
return CtrlImg::ibeam0();
return Image::Arrow();
}
开发者ID:pedia,项目名称:raidget,代码行数:9,代码来源:RichTextView.cpp
示例14: GetLink
void USmartNavLinkComponent::OnApplyModifiers(FCompositeNavModifier& Modifiers)
{
FNavigationLink LinkMod = GetLink();
Modifiers.Add(FSimpleLinkNavModifier(LinkMod, GetOwner()->GetTransform()));
if (bCreateBoxObstacle)
{
Modifiers.Add(FAreaNavModifier(FBox::BuildAABB(ObstacleOffset, ObstacleExtent), GetOwner()->GetTransform(), ObstacleAreaClass));
}
}
开发者ID:Tigrouzen,项目名称:UnrealEngine-4,代码行数:10,代码来源:SmartNavLinkComponent.cpp
示例15:
// _LockNext
//
// Unlock block then mark next block and return -> next block. If next
// block is corrupted then returns NULL. If next block is END then unlock
// this block and return NULL.
BLKHEAD * CHeapBlock::_LockNext(BLKHEAD *pBlk)
{
// Critical section;
// Skip locked free blocks
for(pBlk = GetLink(pBlk)->pNextFree ; pBlk != NULL; pBlk = GetLink(pBlk)->pNextFree) {
if (pBlk->tThis == TYPEFREE) {
// pBlk->tThis = TYPELOCK;
break;
}
// if (pBlk->tThis != TYPELOCK) {
else {
pBlk = NULL; //*** CORRUPTED HEAP ***
break;
}
}
return pBlk;
}
开发者ID:JoeAltmaier,项目名称:Odyssey,代码行数:25,代码来源:HeapBlock.cpp
示例16: GetMouseCursor
wxCursor wxHtmlWordCell::GetMouseCursor(wxHtmlWindowInterface *window) const
{
if ( !GetLink() )
{
return window->GetHTMLCursor(wxHtmlWindowInterface::HTMLCursor_Text);
}
else
{
return wxHtmlCell::GetMouseCursor(window);
}
}
开发者ID:CyberIntelMafia,项目名称:clamav-devel,代码行数:11,代码来源:htmlcell.cpp
示例17: GetCursor
wxCursor wxHtmlCell::GetCursor() const
{
if ( GetLink() )
{
if ( !gs_cursorLink )
gs_cursorLink = new wxCursor(wxCURSOR_HAND);
return *gs_cursorLink;
}
else
return *wxSTANDARD_CURSOR;
}
开发者ID:gitrider,项目名称:wxsj2,代码行数:11,代码来源:htmlcell.cpp
示例18: CopyLayoutChildren
//------------------------------------------------------------------------------
void CUIEdProjectUI::CopyLayoutChildren(CUIEdAttrLinkData* parent,CUIEdAttrLinkData* old,int actionModifer)
{
for (int i=0; i<(int)old->m_Children.size(); i++)
{
CIwAttrInstance* inst=Add(old->m_Children[i]->m_Element,parent->m_Element,ACTIONMODIFIER_KEEPNAME);
CUIEdAttrLinkData* link2=GetLink(inst);
if (link2!=NULL)
SetName(link2);
}
}
开发者ID:SamanthaClark,项目名称:UI-Builder,代码行数:12,代码来源:IwUIEdProjectUI.cpp
注:本文中的GetLink函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论