コード例 #1
0
        /// <summary>
        /// Creates a plain copy of the objects that contains same values.
        /// </summary>
        /// <returns>Exact plain copy of the object.</returns>
        public override SubPart PlainCopy()
        {
            var result = new CPStruct();

            result.CloneValuesFrom(this);
            return(result);
        }
コード例 #2
0
        private bool ValueEquals(CPStruct other)
        {
            if (this.Templated != other.Templated)
            {
                return(false);
            }

            if (this.Templated == eBoolean.True)
            {
                bool result = true;
                result &= this.Concatenator == other.Concatenator;
                result &= this.ConcatenatorExists == other.ConcatenatorExists;
                if (!result)
                {
                    return(false);
                }

                result &= this.GeometryLodA == other.GeometryLodA;
                result &= this.GeometryLodB == other.GeometryLodB;
                result &= this.GeometryLodC == other.GeometryLodC;
                result &= this.GeometryLodD == other.GeometryLodD;
                result &= this.GeometryLodE == other.GeometryLodE;
                result &= this.GeometryLodAExists == other.GeometryLodAExists;
                result &= this.GeometryLodBExists == other.GeometryLodBExists;
                result &= this.GeometryLodCExists == other.GeometryLodCExists;
                result &= this.GeometryLodDExists == other.GeometryLodDExists;
                result &= this.GeometryLodEExists == other.GeometryLodEExists;
                return(result);
            }
            else
            {
                bool result = true;
                result &= this.GeometryLodA.BinHash() == other.GeometryLodA.BinHash();
                result &= this.GeometryLodB.BinHash() == other.GeometryLodB.BinHash();
                result &= this.GeometryLodC.BinHash() == other.GeometryLodC.BinHash();
                result &= this.GeometryLodD.BinHash() == other.GeometryLodD.BinHash();
                result &= this.GeometryLodE.BinHash() == other.GeometryLodE.BinHash();
                result &= this.GeometryLodAExists == other.GeometryLodAExists;
                result &= this.GeometryLodBExists == other.GeometryLodBExists;
                result &= this.GeometryLodCExists == other.GeometryLodCExists;
                result &= this.GeometryLodDExists == other.GeometryLodDExists;
                result &= this.GeometryLodEExists == other.GeometryLodEExists;
                return(result);
            }
        }