seqcnt.cxx

来自「EFI(Extensible Firmware Interface)是下一代BI」· CXX 代码 · 共 79 行

CXX
79
字号
/*++

Copyright (c) 1990-1999 Microsoft Corporation

Module Name:

    seqcnt.cxx

Abstract:

    This module contains the definition for the SEQUENTIAL_CONTAINER class.
    There exists no implementation, merely a constructor that acts as a link
    between derived classes as SEQUENTIAL_CONTAINERs base class CONTAINER.

Environment:

    ULIB, User Mode

[Notes:]

    optional-notes

--*/

#include <pch.cxx>

#define _ULIB_MEMBER_

#include "ulib.hxx"
#include "iterator.hxx"
#include "seqcnt.hxx"


DEFINE_CONSTRUCTOR( SEQUENTIAL_CONTAINER, CONTAINER );

SEQUENTIAL_CONTAINER::~SEQUENTIAL_CONTAINER(
    )
{
}

ULIB_EXPORT
BOOLEAN
SEQUENTIAL_CONTAINER::DeleteAllMembers(
    )
/*++

Routine Description:

    This routine not only removes all members from the container
    class, but also deletes all the objects themselves.

Arguments:

    None.

Return Value:

    FALSE   - Failure.
    TRUE    - Success.

--*/
{
    PITERATOR   iter;
    POBJECT     pobj;

    if (!(iter = QueryIterator())) {
        return FALSE;
    }

    iter->GetNext();
    while (iter->GetCurrent()) {
        pobj = Remove(iter);
        DELETE(pobj);
    }
    DELETE(iter);

    return TRUE;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?