Grail's universal data container
More...
|
|
delegate object | MergeStrategy (object ours, object theirs) |
| |
|
| Blackboard (Blackboard other) |
| |
| void | RemoveEntry (string key) |
| | Deletes value keyed with given key from this blackboard. More...
|
| |
| bool | ContainsKey (string key) |
| | Checks whether this blackboard contains given key. More...
|
| |
| void | Merge (Blackboard other) |
| | Merges data from other blackboard into this one, uses OursStrategy to resolve conflicts. More...
|
| |
| void | Merge (Blackboard other, MergeStrategy mergeStrategy) |
| | Merges data from other blackboard into this one. More...
|
| |
| void | SetValue< T > (string key, T value) |
| | Inserts key and value into this blackboard. If key already exists new value is assigned. More...
|
| |
| void | SetDefaultValue< T > (string key) |
| | Inserts key and default value of given type into this blackboard. If key already exists new value is assigned. More...
|
| |
| T | GetValue< T > (string key) |
| | Returns value paired with given key. If blackboard does not contain key, new entry is created. More...
|
| |
| bool | TryGetValue< T > (string key, out T value) |
| | Checks whether blackboard contains given key. If it does, assigns keyed value to out parameter value. More...
|
| |
|
IEnumerator< KeyValuePair< string, object > > | GetEnumerator () |
| |
Grail's universal data container
◆ ContainsKey()
| bool Grail.Blackboard.ContainsKey |
( |
string |
key | ) |
|
|
inline |
Checks whether this blackboard contains given key.
- Parameters
-
- Returns
- true if key exists, false if not
◆ GetValue< T >()
| T Grail.Blackboard.GetValue< T > |
( |
string |
key | ) |
|
|
inline |
Returns value paired with given key. If blackboard does not contain key, new entry is created.
- Parameters
-
- Template Parameters
-
- Returns
- value paired with given key
◆ Merge() [1/2]
Merges data from other blackboard into this one, uses OursStrategy to resolve conflicts.
- Parameters
-
◆ Merge() [2/2]
| void Grail.Blackboard.Merge |
( |
Blackboard |
other, |
|
|
MergeStrategy |
mergeStrategy |
|
) |
| |
|
inline |
Merges data from other blackboard into this one.
- Parameters
-
| other | |
| mergeStrategy | determines how conflicts will be resolved |
◆ OursStrategy()
| static object Grail.Blackboard.OursStrategy |
( |
object |
ours, |
|
|
object |
theirs |
|
) |
| |
|
inlinestatic |
OursStrategy
- Parameters
-
- Returns
- ours
◆ RemoveEntry()
| void Grail.Blackboard.RemoveEntry |
( |
string |
key | ) |
|
|
inline |
Deletes value keyed with given key from this blackboard.
- Parameters
-
◆ SetDefaultValue< T >()
| void Grail.Blackboard.SetDefaultValue< T > |
( |
string |
key | ) |
|
|
inline |
Inserts key and default value of given type into this blackboard. If key already exists new value is assigned.
- Parameters
-
- Template Parameters
-
◆ SetValue< T >()
| void Grail.Blackboard.SetValue< T > |
( |
string |
key, |
|
|
T |
value |
|
) |
| |
|
inline |
Inserts key and value into this blackboard. If key already exists new value is assigned.
- Parameters
-
- Template Parameters
-
◆ TheirsStrategy()
| static object Grail.Blackboard.TheirsStrategy |
( |
object |
ours, |
|
|
object |
theirs |
|
) |
| |
|
inlinestatic |
TheirsStrategy
- Parameters
-
- Returns
- theirs
◆ TryGetValue< T >()
| bool Grail.Blackboard.TryGetValue< T > |
( |
string |
key, |
|
|
out T |
value |
|
) |
| |
|
inline |
Checks whether blackboard contains given key. If it does, assigns keyed value to out parameter value.
- Parameters
-
- Template Parameters
-
- Returns
- true if key exists, false if it does not.
◆ TwoWayMerge() [1/2]
TwoWayMerge - merges second blackboard into first and first into second, uses OursStrategy in both cases
- Parameters
-
◆ TwoWayMerge() [2/2]
| static void Grail.Blackboard.TwoWayMerge |
( |
Blackboard |
first, |
|
|
Blackboard |
second, |
|
|
MergeStrategy |
firstStrategy, |
|
|
MergeStrategy |
secondStrategy |
|
) |
| |
|
inlinestatic |
TwoWayMerge - merges second blackboard into first and first into second, uses provided merge strategies
- Parameters
-
| first | |
| second | |
| firstStrategy | |
| secondStrategy | |
◆ Size
| int Grail.Blackboard.Size |
|
get |
The documentation for this class was generated from the following file:
- GrailSystem/source/Blackboard.cs