Beispiel #1
0
        //private bool[][] reversible;

        /// <summary> Initializes this object with the given source of wavelet
        /// coefficients. It initializes the resolution level for full resolutioin
        /// reconstruction.
        ///
        /// </summary>
        /// <param name="src">from where the wavelet coefficinets should be obtained.
        ///
        /// </param>
        /// <param name="decSpec">The decoder specifications
        ///
        /// </param>
        public InvWTFull(CBlkWTDataSrcDec src, DecoderSpecs decSpec) : base(src, decSpec)
        {
            this.src = src;
            int nc = src.NumComps;

            reconstructedComps = new DataBlk[nc];
            ndl = new int[nc];
            pw  = FacilityManager.ProgressWatch;
        }
 internal static void registerProgressWatch(SupportClass.ThreadClass t, ProgressWatch pw)
 {
     if (pw == null)
     {
         throw new System.NullReferenceException();
     }
     if (t == null)
     {
         defWatchProg = pw;
     }
     else
     {
         watchProgList[t] = pw;
     }
 }
        private void VerifyByRelatedGeometry(
            [NotNull] IList <TestsWithRelatedGeometry> relGeomTests)
        {
            int tableIndex = -1;
            int tableCount = relGeomTests.Count;

            Stopwatch watch = _msg.DebugStartTiming();

            var progressWatch =
                new ProgressWatch(args => container_OnProgressChanged(this, args));

            foreach (TestsWithRelatedGeometry relGeomTest in relGeomTests)
            {
                tableIndex++;
                if (Cancelled)
                {
                    return;
                }

                if (!relGeomTest.HasAnyAssociationsToFeatureClasses)
                {
                    continue;
                }

                ITable        table         = relGeomTest.Table;
                IList <ITest> testsForTable = relGeomTest.Tests;

                IList <IRow> rows;
                using (progressWatch.MakeTransaction(
                           Step.DataLoading, Step.DataLoaded, tableIndex, tableCount, table))
                {
                    rows = GetRowsByRelatedGeometry(
                        table, Assert.NotNull(relGeomTest.ObjectDataset), testsForTable[0],
                        Assert.NotNull(relGeomTest.RelClassChains));
                }

                if (rows.Count == 0)
                {
                    continue;
                }

                // there are rows found by related geometry

                var testIndex = 0;
                int testCount = testsForTable.Count;

                foreach (ITest test in testsForTable)
                {
                    try
                    {
                        if (Cancelled)
                        {
                            return;
                        }

                        test.TestingRow += container_TestingRow;
                        test.QaError    += HandleError;

                        using (progressWatch.MakeTransaction(
                                   Step.ITestProcessing, Step.ITestProcessed, testIndex, testCount, test))
                        {
                            Verify(test, rows);
                        }

                        testIndex++;
                    }
                    finally
                    {
                        test.TestingRow -= container_TestingRow;
                        test.QaError    -= HandleError;
                    }
                }

                // TODO: Verify this:
                // Because the _lastInvolvedRowsReferenceGeometry is tested for reference-equality
                // in GetReferenceGeometry() and for each error a new InvolvedRows list is created,
                // this should not really have an effect:

                //_lastInvolvedRowsReferenceGeometry = null;
                //_lastReferenceGeometry = null;
            }

            _msg.DebugStopTiming(watch, "VerifyByRelatedGeometry()");
        }
Beispiel #4
0
		internal static void  registerProgressWatch(SupportClass.ThreadClass t, ProgressWatch pw)
		{
			if (pw == null)
			{
				throw new System.NullReferenceException();
			}
			if (t == null)
			{
				defWatchProg = pw;
			}
			else
			{
				watchProgList[t] = pw;
			}
		}
Beispiel #5
0
		//private bool[][] reversible;
		
		/// <summary> Initializes this object with the given source of wavelet
		/// coefficients. It initializes the resolution level for full resolutioin
		/// reconstruction.
		/// 
		/// </summary>
		/// <param name="src">from where the wavelet coefficinets should be obtained.
		/// 
		/// </param>
		/// <param name="decSpec">The decoder specifications
		/// 
		/// </param>
		public InvWTFull(CBlkWTDataSrcDec src, DecoderSpecs decSpec):base(src, decSpec)
		{
			this.src = src;
			int nc = src.NumComps;
			reconstructedComps = new DataBlk[nc];
			ndl = new int[nc];
			pw = FacilityManager.ProgressWatch;
		}