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(); } } }
public AdvDupeObject(AdvDupeObject [] BaseObj) { this.Type = AdvDupeObjectType.Array; this._TypeArray = BaseObj; }
public AdvDupeObject(Table BaseObj) { this.Type = AdvDupeObjectType.Table; this._TypeTable = BaseObj; }
public AdvDupeObject(String BaseObj) { this.Type = AdvDupeObjectType.String; this._TypeString = BaseObj; }
public AdvDupeObject(Angle BaseObj) { this.Type = AdvDupeObjectType.Angle; this._TypeAng = BaseObj; }
public AdvDupeObject(Boolean BaseObj) { this.Type = AdvDupeObjectType.Boolean; this._TypeBoolean = BaseObj; }
public AdvDupeObject(Vector BaseObj) { this.Type = AdvDupeObjectType.Vector; this._TypeVec = BaseObj; }
public AdvDupeObject(Double BaseObj) { this.Type = AdvDupeObjectType.Number; this._TypeDouble = BaseObj; }