本文整理汇总了C++中DoublyLinkedList::GetIterator方法的典型用法代码示例。如果您正苦于以下问题:C++ DoublyLinkedList::GetIterator方法的具体用法?C++ DoublyLinkedList::GetIterator怎么用?C++ DoublyLinkedList::GetIterator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DoublyLinkedList
的用法示例。
在下文中一共展示了DoublyLinkedList::GetIterator方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: _
static status_t
ethernet_link_checker(void *)
{
while (true) {
status_t status = acquire_sem_etc(sLinkChangeSemaphore, 1,
B_RELATIVE_TIMEOUT, kLinkCheckInterval);
if (status == B_BAD_SEM_ID)
break;
MutexLocker _(sListLock);
if (sCheckList.IsEmpty())
break;
// check link state of all existing devices
DoublyLinkedList<ethernet_device>::Iterator iterator
= sCheckList.GetIterator();
while (iterator.HasNext()) {
update_link_state(iterator.Next());
}
}
return B_OK;
}
示例2: while
static int
DumpHciConnections(int argc, char** argv)
{
HciConnection* conn;
L2capChannel* chan;
L2capFrame* frame;
DoublyLinkedList<HciConnection>::Iterator iterator
= sConnectionList.GetIterator();
while (iterator.HasNext()) {
conn = iterator.Next();
/*
kprintf("LocalDevice=0x%" B_PRIx32 " Destination=%s handle=%#x type=%d"
"outqueue=%" B_PRId32 " expected=%" B_PRId32 "\n", conn->Hid,
bdaddrUtils::ToString(conn->destination).String(), conn->handle,
conn->type, conn->OutGoingFrames.Count(),
conn->ExpectedResponses.Count());
*/
// each channel
kprintf("\tChannels\n");
DoublyLinkedList<L2capChannel>::Iterator channelIterator
= conn->ChannelList.GetIterator();
while (channelIterator.HasNext()) {
chan = channelIterator.Next();
kprintf("\t\tscid=%x dcid=%x state=%x cfg=%x\n", chan->scid,
chan->dcid, chan->state, chan->cfgState);
}
// Each outgoing
kprintf("\n\tOutGoingFrames\n");
DoublyLinkedList<L2capFrame>::Iterator frameIterator
= conn->OutGoingFrames.GetIterator();
while (frameIterator.HasNext()) {
frame = frameIterator.Next();
kprintf("\t\tscid=%x code=%x ident=%x type=%x, buffer=%p\n",
frame->channel->scid, frame->code, frame->ident,
frame->type, frame->buffer);
}
// Each expected
kprintf("\n\tExpectedFrames\n");
DoublyLinkedList<L2capFrame>::Iterator frameExpectedIterator
= conn->ExpectedResponses.GetIterator();
while (frameExpectedIterator.HasNext()) {
frame = frameExpectedIterator.Next();
kprintf("\t\tscid=%x code=%x ident=%x type=%x, buffer=%p\n",
frame->channel->scid, frame->code, frame->ident,
frame->type, frame->buffer);
}
}
return 0;
}