iterator.cxx
来自「EFI(Extensible Firmware Interface)是下一代BI」· CXX 代码 · 共 60 行
CXX
60 行
/*++
Copyright (c) 1990-1999 Microsoft Corporation
Module Name:
iterator.cxx
Abstract:
This contains the definitions for the non-inline member functions
for the abstract ITERATOR class. The only interesting aspect of this
implementation is that the destructor decrements the iterator count in
it's associated CONTAINER. This count, increment by the CONTAINER when
the ITERATOR is constructed, allows the associated CONTAINER to watch
for outstanding ITERATORs when it is destroyed - a situation which is
dangerous and surely a bug.
Environment:
ULIB, User Mode
[Notes:]
optional-notes
--*/
#include <pch.cxx>
#define _ULIB_MEMBER_
#include "ulib.hxx"
#include "iterator.hxx"
DEFINE_CONSTRUCTOR( ITERATOR, OBJECT );
ITERATOR::~ITERATOR(
)
{
}
POBJECT
ITERATOR::FindNext(
IN PCOBJECT Key
)
{
POBJECT p;
for (p = GetNext(); p; p = GetNext()) {
if (!Key->Compare(p)) {
break;
}
}
return p;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?