blob: b3202cf4f35eb43785474319eb6903b078ca08e5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
/*++
Copyright (c) 1990 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.
Author:
David J. Gilman (davegi) 02-Nov-1990
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;
}
|