-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathCMultiverseCollection.cpp
69 lines (48 loc) · 1.11 KB
/
CMultiverseCollection.cpp
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
// CMultiverseCollection.cpp
//
// CMultiverseCollection Class
// Copyright (c) 2012 by Kronosaur Productions, LLC. All Rights Reserved.
#include "PreComp.h"
void CMultiverseCollection::DeleteAll (void)
// DeleteAll
//
// Delete all entries in the collection
{
int i;
for (i = 0; i < m_List.GetCount(); i++)
delete m_List[i];
m_List.DeleteAll();
}
bool CMultiverseCollection::HasAllUNIDs (const TArray<DWORD> &UNIDList) const
// HasAllUNIDs
//
// Returns TRUE if we have all of the given unids
{
int i;
for (i = 0; i < UNIDList.GetCount(); i++)
if (!HasUNID(UNIDList[i]))
return false;
return true;
}
bool CMultiverseCollection::HasAnyUNID (const TArray<DWORD> &UNIDList) const
// HasAnyUNID
//
// Returns TRUE if we have any of the given UNIDs
{
int i;
for (i = 0; i < UNIDList.GetCount(); i++)
if (HasUNID(UNIDList[i]))
return true;
return false;
}
bool CMultiverseCollection::HasUNID (DWORD dwUNID) const
// HasUNID
//
// Returns TRUE if we have the given UNID
{
int i;
for (i = 0; i < m_List.GetCount(); i++)
if (m_List[i]->GetUNID() == dwUNID)
return true;
return false;
}