forked from laicasaane/unity-supplements
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathITable.cs
More file actions
88 lines (50 loc) · 2.02 KB
/
Copy pathITable.cs
File metadata and controls
88 lines (50 loc) · 2.02 KB
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
83
84
85
86
87
88
using System.Collections.Generic;
namespace System.Table
{
public interface IReadTable<T> : IEnumerable<ReadEntry<T>>
where T : IEntry
{
int Count { get; }
IEnumerable<T> Entries { get; }
bool TryGetEntry(int id, out T entry);
T GetEntry(int id = 0);
bool ContainsId(int id);
}
public interface ITable<T> : IReadTable<T>
where T : IEntry
{
void Clear();
void Add(int id, T entry);
void Add(T entry);
void Add(T entry, bool autoIncrement);
void Add(T entry, IGetId<T> idGetter);
void Add(int id, in ReadEntry<T> entry);
void Add(in ReadEntry<T> entry);
void Add(in ReadEntry<T> entry, bool autoIncrement);
void Add(in ReadEntry<T> entry, IGetId<T> idGetter);
bool TryAdd(int id, T entry);
bool TryAdd(T entry);
bool TryAdd(T entry, IGetId<T> idGetter);
bool TryAdd(int id, in ReadEntry<T> entry);
bool TryAdd(in ReadEntry<T> entry);
bool TryAdd(in ReadEntry<T> entry, IGetId<T> idGetter);
void AddRange(T[] entries);
void AddRange(T[] entries, bool autoIncrement);
void AddRange(T[] entries, IGetId<T> idGetter);
void AddRange(IEnumerable<T> entries);
void AddRange(IEnumerable<T> entries, bool autoIncrement);
void AddRange(IEnumerable<T> entries, IGetId<T> idGetter);
void AddRange(ReadEntry<T>[] entries);
void AddRange(ReadEntry<T>[] entries, bool autoIncrement);
void AddRange(ReadEntry<T>[] entries, IGetId<T> idGetter);
void AddRange(IEnumerable<ReadEntry<T>> entries);
void AddRange(IEnumerable<ReadEntry<T>> entries, bool autoIncrement);
void AddRange(IEnumerable<ReadEntry<T>> entries, IGetId<T> idGetter);
void Remove(int id);
void Remove(T entry);
void Remove(in ReadEntry<T> entry);
bool TryRemove(int id);
bool TryRemove(T entry);
bool TryRemove(in ReadEntry<T> entry);
}
}