本文整理汇总了C++中AttributeList::GetIterator方法的典型用法代码示例。如果您正苦于以下问题:C++ AttributeList::GetIterator方法的具体用法?C++ AttributeList::GetIterator怎么用?C++ AttributeList::GetIterator使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AttributeList
的用法示例。
在下文中一共展示了AttributeList::GetIterator方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: fail
/*! Registers any children that are identified via the B_DEVICE_FIXED_CHILD
attribute.
If any of these children cannot be registered, this call will fail (we
don't remove children we already registered up to this point in this case).
*/
status_t
device_node::_RegisterFixed(uint32& registered)
{
AttributeList::Iterator iterator = fAttributes.GetIterator();
registered = 0;
while (iterator.HasNext()) {
device_attr_private* attr = iterator.Next();
if (strcmp(attr->name, B_DEVICE_FIXED_CHILD))
continue;
driver_module_info* driver;
status_t status = get_module(attr->value.string,
(module_info**)&driver);
if (status != B_OK) {
TRACE(("register fixed child %s failed: %s\n", attr->value.string,
strerror(status)));
return status;
}
if (driver->register_device != NULL) {
status = driver->register_device(this);
if (status == B_OK)
registered++;
}
put_module(attr->value.string);
if (status != B_OK)
return status;
}
return B_OK;
}