本文整理汇总了C++中Link::Suc方法的典型用法代码示例。如果您正苦于以下问题:C++ Link::Suc方法的具体用法?C++ Link::Suc怎么用?C++ Link::Suc使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Link
的用法示例。
在下文中一共展示了Link::Suc方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
UINT
Head::Cardinal() const
{
unsigned int cardinal = 0;
for (Link* l = First(); l; l = l->Suc())
cardinal++;
return cardinal;
}
示例2: Cleanup
void PrefsLoadManager::Cleanup(BOOL force)
{
PLoader *q;
Link *p = m_activeLoaders.First();
while(p)
{
q = static_cast<PLoader *>(p);
p = p->Suc();
if(q->IsDead() || force)
{
q->Out();
OP_DELETE(q);
}
}
}
示例3: OnTimeOut
void SpdyFramesHandler::OnTimeOut(OpTimer* timer)
{
OP_ASSERT(timer == &removeStreamsTimer);
removeStreamsTimerSet = FALSE;
Link *suc;
for (Link *it = streamsToDestroy.First(); it; it = suc)
{
suc = it->Suc();
SpdyStreamHandler *data;
streamHandlers.Remove(static_cast<SpdyStreamHandler*>(it)->GetStreamId(), &data);
if (static_cast<SpdyStreamHandler*>(it) != activeDataConsumer)
{
it->Out();
OP_DELETE(it);
}
}
}
示例4:
/* static */ BOOL
ES_DebugBuiltins::getHeapInformation(ES_Execution_Context *context, unsigned argc, ES_Value_Internal *argv, ES_Value_Internal *return_value)
{
Head *active, *inactive, *destroy;
g_ecmaManager->GetHeapLists(active, inactive, destroy);
TempBuffer *buffer = g_ecmaManager->GetHeapDebuggerBuffer();
buffer->Clear();
buffer->Append("{ \"heaps\": { ");
ES_Heap *heads[3] = { static_cast<ES_Heap *>(active->First()), static_cast<ES_Heap *>(inactive->First()), static_cast<ES_Heap *>(destroy->First()) };
for (unsigned head = 0; head < 3; ++head)
for (ES_Heap *heap = heads[head]; heap; heap = static_cast<ES_Heap *>(heap->Suc()))
{
buffer->AppendFormat(UNI_L("\"%u\": { \"bytesLive\": %u, \"bytesLivePeak\": %u, \"bytesLimit\": %u, \"runtimes\": ["), heap->Id(), heap->GetBytesLive(), heap->GetBytesLivePeak(), heap->GetBytesLimit());
ES_Runtime *runtime = heap->GetFirstRuntime();
while (runtime)
{
#ifndef _STANDALONE
ES_Object *global_object = runtime->GetGlobalObject();
if (global_object->IsHostObject() && ES_Runtime::GetHostObject(global_object)->IsA(DOM_TYPE_WINDOW))
{
OpString url;
DOM_Utils::GetOriginURL(DOM_Utils::GetDOM_Runtime(runtime)).GetAttribute(URL::KUniName, url);
for (unsigned index = 0; index < static_cast<unsigned>(url.Length()); ++index)
if (url.CStr()[index] == '"')
url.Insert(index++, "\\");
buffer->AppendFormat(UNI_L("\"%s\""), url.CStr());
}
else
#endif // _STANDALONE
buffer->Append("\"<unidentified runtime>\"");
runtime = g_ecmaManager->GetNextRuntimePerHeap(runtime);
if (runtime)
buffer->Append(", ");
}
buffer->Append("] }, ");
}
buffer->AppendFormat(UNI_L("\"count\": %u }, \"allocators\": ["), active->Cardinal() + inactive->Cardinal() + destroy->Cardinal());
for (ES_PageAllocator *allocator = static_cast<ES_PageAllocator *>(g_ecmaPageAllocatorList->First()); allocator; allocator = static_cast<ES_PageAllocator *>(allocator->Suc()))
{
buffer->AppendFormat(UNI_L("{ \"chunks\": %u, \"chunkSize\": %u, \"pages\": %u, \"pageSize\": %u, \"heaps\": ["), allocator->CountChunks(), allocator->ChunkSize(), allocator->CountPages(), allocator->PageSize());
for (ES_HeapHandle *heaph = allocator->GetFirstHeapHandle(); heaph; heaph = static_cast<ES_HeapHandle *>(heaph->Suc()))
{
buffer->AppendUnsignedLong(heaph->heap->Id());
if (heaph->Suc())
buffer->Append(", ");
}
buffer->Append("] }");
if (allocator->Suc())
buffer->Append(", ");
}
buffer->Append("], \"cachedPrograms\": [");
for (Link *link = RT_DATA.program_cache->GetCachedPrograms()->First(); link; link = link->Suc())
{
ES_ProgramCodeStatic *program = static_cast<ES_ProgramCodeStatic *>(link);
buffer->AppendFormat(UNI_L("{ \"url\": \"\", \"length\": %u }"), program->source.GetSource()->length);
if (link->Suc())
buffer->Append(", ");
}
buffer->Append("] }");
return_value->SetString(JString::Make(context, buffer->GetStorage(), buffer->Length()));
return TRUE;
}