本文整理汇总了C++中PODVector::At方法的典型用法代码示例。如果您正苦于以下问题:C++ PODVector::At方法的具体用法?C++ PODVector::At怎么用?C++ PODVector::At使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PODVector
的用法示例。
在下文中一共展示了PODVector::At方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: js_atomic_destroy_node
static void js_atomic_destroy_node(Node* node, duk_context* ctx, bool root = false)
{
if (root)
{
PODVector<Node*> children;
node->GetChildren(children, true);
for (unsigned i = 0; i < children.Size(); i++)
{
if (children.At(i)->JSGetHeapPtr())
js_atomic_destroy_node(children.At(i), ctx);
}
}
const Vector<SharedPtr<Component> >& components = node->GetComponents();
for (unsigned i = 0; i < components.Size(); i++)
{
Component* component = components[i];
if (component->GetType() == JSComponent::GetTypeStatic())
{
JSComponent* jscomponent = (JSComponent*) component;
jscomponent->SetDestroyed();
}
component->UnsubscribeFromAllEvents();
}
node->RemoveAllComponents();
node->UnsubscribeFromAllEvents();
node->Remove();
}
示例2: HandleWidgetLoaded
void JSUI::HandleWidgetLoaded(StringHash eventType, VariantMap& eventData)
{
using namespace WidgetLoaded;
UIWidget* widget = static_cast<UIWidget*>(eventData[P_WIDGET].GetPtr());
if (!widget)
return;
void* heapptr = widget->JSGetHeapPtr();
if (!heapptr)
return;
TBWidget* tbwidget = widget->GetInternalWidget();
assert(tbwidget);
// all widgets with id's are wrapped, so that event handlers are bubbled up properly
// note that all js widget object representations are kept alive in HandleObjectAdded
// when pushed into the VM
PODVector<TBWidget*> widgets;
GatherWidgets(tbwidget, widgets);
UI* ui = GetSubsystem<UI>();
for (unsigned i = 0; i < widgets.Size(); i++)
{
UIWidget* o = ui->WrapWidget(widgets.At(i));
if (!o)
continue;
js_push_class_object_instance(ctx_, o);
}
}