-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathSpField.cs
More file actions
32 lines (26 loc) · 740 Bytes
/
SpField.cs
File metadata and controls
32 lines (26 loc) · 740 Bytes
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
using System.Collections;
public class SpField {
public string Name;
public SpType Type;
public string TypeName;
public short Tag;
public bool IsTable;
public string KeyName;
private SpTypeManager mTypeManager;
public SpField (string name, short tag, string type, bool table, string key, SpTypeManager m) {
Name = name;
Tag = tag;
TypeName = type;
IsTable = table;
KeyName = key;
mTypeManager = m;
}
public bool CheckAndUpdate () {
if (Type != null)
return true;
// use GetTypeNoCheck instead of GetType, to prevent infinit GetType call
// when a type reference itself like : foobar { a 0 : foobar }
Type = mTypeManager.GetTypeNoCheck (TypeName);
return (Type != null);
}
}