Beispiel #1
0
        public AdvDupeObject(Object BaseObj = null)
        {
            if (BaseObj is null)
            {
                this.Type = AdvDupeObjectType.Null;
            }
            else
            {
                Type BT = BaseObj.GetType();

                if (BT == typeof(Angle))
                {
                    this.Type     = AdvDupeObjectType.Angle;
                    this._TypeAng = (Angle)BaseObj;
                }
                else if (BT == typeof(Vector))
                {
                    this.Type     = AdvDupeObjectType.Vector;
                    this._TypeVec = (Vector)BaseObj;
                }
                else if (BT == typeof(AdvDupeObject []))
                {
                    this.Type       = AdvDupeObjectType.Array;
                    this._TypeArray = (AdvDupeObject [])BaseObj;
                }
                else if (BT == typeof(Table))
                {
                    this.Type       = AdvDupeObjectType.Table;
                    this._TypeTable = (Table)BaseObj;
                }
                else if (BT == typeof(Boolean))
                {
                    this.Type         = AdvDupeObjectType.Boolean;
                    this._TypeBoolean = (Boolean)BaseObj;
                }
                else if (BT == typeof(Double))
                {
                    this.Type        = AdvDupeObjectType.Number;
                    this._TypeDouble = (Double)BaseObj;
                }
                else if (BT == typeof(String))
                {
                    this.Type        = AdvDupeObjectType.String;
                    this._TypeString = (String)BaseObj;
                }
                else if (BT == typeof(AdvDupeRefrence))
                {
                    AdvDupeRefrence Ref = (AdvDupeRefrence)BaseObj;
                    this.Type = Ref.Refrance.Type;
                    this._Ref = Ref;
                }
                else
                {
                    throw new InvalidCastException();
                }
            }
        }
Beispiel #2
0
 public AdvDupeObject(AdvDupeObject [] BaseObj)
 {
     this.Type       = AdvDupeObjectType.Array;
     this._TypeArray = BaseObj;
 }
Beispiel #3
0
 public AdvDupeObject(Table BaseObj)
 {
     this.Type       = AdvDupeObjectType.Table;
     this._TypeTable = BaseObj;
 }
Beispiel #4
0
 public AdvDupeObject(String BaseObj)
 {
     this.Type        = AdvDupeObjectType.String;
     this._TypeString = BaseObj;
 }
Beispiel #5
0
 public AdvDupeObject(Angle BaseObj)
 {
     this.Type     = AdvDupeObjectType.Angle;
     this._TypeAng = BaseObj;
 }
Beispiel #6
0
 public AdvDupeObject(Boolean BaseObj)
 {
     this.Type         = AdvDupeObjectType.Boolean;
     this._TypeBoolean = BaseObj;
 }
Beispiel #7
0
 public AdvDupeObject(Vector BaseObj)
 {
     this.Type     = AdvDupeObjectType.Vector;
     this._TypeVec = BaseObj;
 }
Beispiel #8
0
 public AdvDupeObject(Double BaseObj)
 {
     this.Type        = AdvDupeObjectType.Number;
     this._TypeDouble = BaseObj;
 }