Beispiel #1
0
        //public Create_ItemType(UnitType unit)
        //    : base(unit)
        //{
        //    Attributes = new List<AttributeSettingType>();
        //    base.eventType = "NewObject"; //not same as object type, used on Gabe's end.
        //}

        //public Create_ItemType(UnitType u, List<AttributeSettingType> atts) :
        //    base(u)
        //{
        //    Attributes = atts;
        //    base.eventType = "NewObject"; //not same as object type, used on Gabe's end.
        //}

        public void Add(string name, DataValue attr)
        {
            DataValue newAttr = new DataValue();

            newAttr = attr;

            Attributes[name] = newAttr;
        }
Beispiel #2
0
 public static string XMLSerialize(DataValue v)
 {
     if (v == null)
     {
         return "";
     }
     switch (v.dataType)
     {
         case "StringType":
             return ((StringValue)v).ToXML();
         case "DoubleType":
             return ((DoubleValue)v).ToXML();
         case "IntegerType":
             return ((IntegerValue)v).ToXML();
         case "LocationType":
             return ((LocationValue)v).ToXML();
         case "VelocityType":
             return ((VelocityValue)v).ToXML();
         case "AttributeCollectionType":
             return ((AttributeCollectionValue)v).ToXML();
         default:
             return "";
     }
 }
Beispiel #3
0
 public void addAttribute(string name, DataValue dv)
 {
     Attributes[name] = dv;
 }