/// <summary> /// 复制(深拷贝) /// </summary> protected override void toCopy(BaseData data) { base.toCopy(data); if (!(data is CenterRoleGroupToolData)) { return; } CenterRoleGroupToolData mData = (CenterRoleGroupToolData)data; if (mData.roleGroupSimpleDataDic != null) { if (this.roleGroupSimpleDataDic != null) { this.roleGroupSimpleDataDic.clear(); this.roleGroupSimpleDataDic.ensureCapacity(mData.roleGroupSimpleDataDic.size()); } else { this.roleGroupSimpleDataDic = new LongObjectMap <RoleGroupSimpleData>(mData.roleGroupSimpleDataDic.size()); } LongObjectMap <RoleGroupSimpleData> roleGroupSimpleDataDicT = this.roleGroupSimpleDataDic; if (!mData.roleGroupSimpleDataDic.isEmpty()) { long roleGroupSimpleDataDicKFreeValue = mData.roleGroupSimpleDataDic.getFreeValue(); long[] roleGroupSimpleDataDicKKeys = mData.roleGroupSimpleDataDic.getKeys(); RoleGroupSimpleData[] roleGroupSimpleDataDicVValues = mData.roleGroupSimpleDataDic.getValues(); for (int roleGroupSimpleDataDicKI = roleGroupSimpleDataDicKKeys.Length - 1; roleGroupSimpleDataDicKI >= 0; --roleGroupSimpleDataDicKI) { long roleGroupSimpleDataDicK = roleGroupSimpleDataDicKKeys[roleGroupSimpleDataDicKI]; if (roleGroupSimpleDataDicK != roleGroupSimpleDataDicKFreeValue) { RoleGroupSimpleData roleGroupSimpleDataDicV = roleGroupSimpleDataDicVValues[roleGroupSimpleDataDicKI]; long roleGroupSimpleDataDicW; RoleGroupSimpleData roleGroupSimpleDataDicU; roleGroupSimpleDataDicW = roleGroupSimpleDataDicK; if (roleGroupSimpleDataDicV != null) { roleGroupSimpleDataDicU = (RoleGroupSimpleData)roleGroupSimpleDataDicV.clone(); } else { roleGroupSimpleDataDicU = null; nullObjError("roleGroupSimpleDataDicU"); } roleGroupSimpleDataDicT.put(roleGroupSimpleDataDicW, roleGroupSimpleDataDicU); } } } } else { this.roleGroupSimpleDataDic = null; nullObjError("roleGroupSimpleDataDic"); } }
/// <summary> /// 复制(深拷贝) /// </summary> protected override void toCopy(BaseData data) { base.toCopy(data); if (!(data is RoleGroupToolData)) { return; } RoleGroupToolData mData = (RoleGroupToolData)data; if (mData.simpleDatas != null) { if (this.simpleDatas != null) { this.simpleDatas.clear(); this.simpleDatas.ensureCapacity(mData.simpleDatas.size()); } else { this.simpleDatas = new LongObjectMap <RoleGroupSimpleData>(mData.simpleDatas.size()); } LongObjectMap <RoleGroupSimpleData> simpleDatasT = this.simpleDatas; if (!mData.simpleDatas.isEmpty()) { long simpleDatasKFreeValue = mData.simpleDatas.getFreeValue(); long[] simpleDatasKKeys = mData.simpleDatas.getKeys(); RoleGroupSimpleData[] simpleDatasVValues = mData.simpleDatas.getValues(); for (int simpleDatasKI = simpleDatasKKeys.Length - 1; simpleDatasKI >= 0; --simpleDatasKI) { long simpleDatasK = simpleDatasKKeys[simpleDatasKI]; if (simpleDatasK != simpleDatasKFreeValue) { RoleGroupSimpleData simpleDatasV = simpleDatasVValues[simpleDatasKI]; long simpleDatasW; RoleGroupSimpleData simpleDatasU; simpleDatasW = simpleDatasK; if (simpleDatasV != null) { simpleDatasU = (RoleGroupSimpleData)simpleDatasV.clone(); } else { simpleDatasU = null; nullObjError("simpleDatasU"); } simpleDatasT.put(simpleDatasW, simpleDatasU); } } } } else { this.simpleDatas = null; nullObjError("simpleDatas"); } }