|
| Dictionary< int, object > | mapObj = new Dictionary<int, object>() |
| |
| Dictionary< int, int > | mapInt = new Dictionary<int, int>() |
| |
| Dictionary< int, string > | mapStr = new Dictionary<int, string>() |
| |
Definition at line 4 of file BaseCard.cs.
◆ AddInt()
| void BaseCard.AddInt |
( |
int |
id, |
|
|
int |
value |
|
) |
| |
|
inline |
Definition at line 30 of file BaseCard.cs.
31 {
33 }
int GetInt(int id, int? defaultInt=null)
void SetInt(int id, int value=0)
References GetInt(), and SetInt().
◆ GetBool()
| bool BaseCard.GetBool |
( |
int |
id | ) |
|
|
inline |
◆ GetInt()
| int BaseCard.GetInt |
( |
int |
id, |
|
|
int? |
defaultInt = null |
|
) |
| |
|
inline |
Definition at line 25 of file BaseCard.cs.
26 {
27 return mapInt.GetValueOrDefault(
id, defaultInt.GetValueOrDefault());
28 }
Dictionary< int, int > mapInt
References mapInt.
Referenced by AddInt(), and GetBool().
◆ GetObj< T >()
| T BaseCard.GetObj< T > |
( |
int |
id | ) |
|
|
inline |
Definition at line 64 of file BaseCard.cs.
65 {
67 {
68 return default(T);
69 }
70 object valueOrDefault =
mapObj.GetValueOrDefault(
id);
71 if (valueOrDefault is T)
72 {
73 return (T)valueOrDefault;
74 }
75 return default(T);
76 }
Dictionary< int, object > mapObj
References mapObj.
◆ GetStr()
| string BaseCard.GetStr |
( |
int |
id, |
|
|
string |
defaultStr = null |
|
) |
| |
|
inline |
Definition at line 47 of file BaseCard.cs.
48 {
49 return mapStr.GetValueOrDefault(
id, defaultStr);
50 }
Dictionary< int, string > mapStr
References mapStr.
◆ SetBool()
| void BaseCard.SetBool |
( |
int |
id, |
|
|
bool |
enable |
|
) |
| |
|
inline |
◆ SetInt()
| void BaseCard.SetInt |
( |
int |
id, |
|
|
int |
value = 0 |
|
) |
| |
|
inline |
◆ SetObj()
| void BaseCard.SetObj |
( |
int |
id, |
|
|
object |
o |
|
) |
| |
|
inline |
Definition at line 78 of file BaseCard.cs.
79 {
81 {
82 mapObj =
new Dictionary<int, object>();
83 }
84 if (o == null)
85 {
87 }
88 else
89 {
91 }
92 }
References mapObj.
◆ SetObj< T >()
Definition at line 94 of file BaseCard.cs.
95 {
97 {
98 mapObj =
new Dictionary<int, object>();
99 }
100 if (o == null)
101 {
103 return default(T);
104 }
106 return (T)o;
107 }
References mapObj.
◆ SetStr()
| void BaseCard.SetStr |
( |
int |
id, |
|
|
string |
value = null |
|
) |
| |
|
inline |
Definition at line 52 of file BaseCard.cs.
53 {
54 if (value.IsEmpty())
55 {
57 }
58 else
59 {
61 }
62 }
References mapStr.
◆ mapInt
| Dictionary<int, int> BaseCard.mapInt = new Dictionary<int, int>() |
◆ mapObj
| Dictionary<int, object> BaseCard.mapObj = new Dictionary<int, object>() |
◆ mapStr
| Dictionary<int, string> BaseCard.mapStr = new Dictionary<int, string>() |
The documentation for this class was generated from the following file: