Example #1
0
 public void Set(BoardProperty <float> prop, float value)
 {
     if (floatBoard == null)
     {
         floatBoard = new TypeBoard <float> ();
     }
     floatBoard.SetValue(prop.name, value);
 }
Example #2
0
 public float Get(BoardProperty <float> prop)
 {
     if (floatBoard == null)
     {
         floatBoard = new TypeBoard <float> ();
     }
     return(floatBoard.GetValue(prop));
 }
Example #3
0
 public void Set(BoardProperty <uint> prop, uint value)
 {
     if (uintBoard == null)
     {
         uintBoard = new TypeBoard <uint> ();
     }
     uintBoard.SetValue(prop.name, value);
 }
Example #4
0
 public uint Get(BoardProperty <uint> prop)
 {
     if (uintBoard == null)
     {
         uintBoard = new TypeBoard <uint> ();
     }
     return(uintBoard.GetValue(prop));
 }
Example #5
0
 public int Get(BoardProperty <int> prop)
 {
     if (intBoard == null)
     {
         intBoard = new TypeBoard <int> ();
     }
     return(intBoard.GetValue(prop));
 }
Example #6
0
 public void Set(BoardProperty <int> prop, int value)
 {
     if (intBoard == null)
     {
         intBoard = new TypeBoard <int> ();
     }
     intBoard.SetValue(prop.name, value);
 }
Example #7
0
 public bool Get(BoardProperty <bool> prop)
 {
     if (boolBoard == null)
     {
         boolBoard = new TypeBoard <bool> ();
     }
     return(boolBoard.GetValue(prop));
 }
Example #8
0
 public void Set(BoardProperty <Fixed> prop, Fixed value)
 {
     if (fixedBoard == null)
     {
         fixedBoard = new TypeBoard <Fixed> ();
     }
     fixedBoard.SetValue(prop.name, value);
 }
Example #9
0
 public Fixed Get(BoardProperty <Fixed> prop)
 {
     if (fixedBoard == null)
     {
         fixedBoard = new TypeBoard <Fixed> ();
     }
     return(fixedBoard.GetValue(prop));
 }
Example #10
0
 public void Set(BoardProperty <bool> prop, bool value)
 {
     if (boolBoard == null)
     {
         boolBoard = new TypeBoard <bool> ();
     }
     boolBoard.SetValue(prop.name, value);
 }
Example #11
0
 public T GetExt <T>(BoardProperty <T> prop)
 {
     if (blackBoard == null)
     {
         blackBoard = new BlackBoard();
     }
     return(blackBoard.Get <T> (prop));
 }
Example #12
0
 public WhiteBoard Get(BoardProperty <WhiteBoard> prop)
 {
     if (whiteBoard == null)
     {
         whiteBoard = new TypeBoard <WhiteBoard> ();
     }
     return(whiteBoard.GetValue(prop));
 }
Example #13
0
 public void SetExt <T>(BoardProperty <T> prop, T value)
 {
     if (blackBoard == null)
     {
         blackBoard = new BlackBoard();
     }
     blackBoard.Set <T> (prop, value);
 }
Example #14
0
 public Vector4 Get(BoardProperty <Vector4> prop)
 {
     if (vec4Board == null)
     {
         vec4Board = new TypeBoard <Vector4> ();
     }
     return(vec4Board.GetValue(prop));
 }
Example #15
0
 public void Set(BoardProperty <WhiteBoard> prop, WhiteBoard value)
 {
     if (whiteBoard == null)
     {
         whiteBoard = new TypeBoard <WhiteBoard> ();
     }
     whiteBoard.SetValue(prop.name, value);
 }
Example #16
0
 public void Set(BoardProperty <Vector4> prop, Vector4 value)
 {
     if (vec4Board == null)
     {
         vec4Board = new TypeBoard <Vector4> ();
     }
     vec4Board.SetValue(prop.name, value);
 }
Example #17
0
 public string Get(BoardProperty <string> prop)
 {
     if (stringBoard == null)
     {
         stringBoard = new TypeBoard <string> ();
     }
     return(stringBoard.GetValue(prop));
 }
Example #18
0
 public void Set(BoardProperty <string> prop, string value)
 {
     if (stringBoard == null)
     {
         stringBoard = new TypeBoard <string> ();
     }
     stringBoard.SetValue(prop.name, value);
 }
Example #19
0
        public T GetValue(BoardProperty <T> prop)
        {
            T outval;

            if (nameToTValue.TryGetValue(prop.name, out outval))
            {
                return(outval);
            }
            nameToTValue.Add(prop.name, prop.GetDefault());
            return(nameToTValue [prop.name]);
        }
Example #20
0
        public T Get <T>(BoardProperty <T> prop)
        {
            object obj;

            if (nameToValues.TryGetValue(prop.name, out obj))
            {
                if (obj is Variant <T> )
                {
                    return(((Variant <T>)obj).Value);
                }
                else
                {
                    throw new ArgumentException(String.Format("variant {0} was not a variant", prop.name));
                }
            }
            else
            {
                nameToValues.Add(prop.name, prop.GetDefault());
                return(((Variant <T>)nameToValues [prop.name]).Value);
            }
        }
Example #21
0
        public void Set <T>(BoardProperty <T> prop, T value)
        {
            object obj;

            if (nameToValues.TryGetValue(prop.name, out obj))
            {
                Variant <T> v = obj as Variant <T>;
                if (v != null)
                {
                    v.Value = value;
                }
                else
                {
                    obj = new Variant <T> (value);
                    nameToValues[prop.name] = obj;
                }
            }
            else
            {
                Variant <T> newvar = new Variant <T> (value);
                nameToValues.Add(prop.name, newvar);
            }
        }