private ExtractedData PrepareExtractedData(string aLine, string aOriginalLine)
        {
            ExtractedData ret = null;

            // We need the heap base address before we are able to start
            // extracting binary data.
            DataSource ds = Interpreter.DataSource;

            Elements.MetaData      metaData = ds.MetaData;
            Elements.Groups.GpHeap heapInfo = metaData.Heap;
            uint baseAddress = heapInfo.HeapBaseAddress;

            if (baseAddress != 0)
            {
                // We can now work out the next expected address
                uint nextExpectedAddress = baseAddress + (uint)metaData.HeapData.Count;

                // Build our regex string that will match the binary heap data.
                string prefix = string.Format("{0:x8}: ", nextExpectedAddress);
                int    pos    = aLine.IndexOf(prefix);
                if (pos >= 0)
                {
                    Match m = KHeapDataRegEx.Match(aLine);
                    if (m.Success)
                    {
                        List <byte> bytes = new List <byte>();
                        //
                        CaptureCollection data = m.Groups["Data"].Captures;
                        foreach (Capture dataItem in data)
                        {
                            string hexValue = dataItem.Value.Trim();
                            uint   byteVal  = System.Convert.ToUInt32(hexValue, KBaseHex);
                            bytes.Add((byte)byteVal);
                        }
                        //
                        ret = ExtractedData.NewBinaryData(bytes.ToArray(), aOriginalLine);
                    }
                }
                //
                if (ret == null)
                {
                    ret = ExtractedData.NewText(aLine, aOriginalLine);
                }
            }
            else
            {
                ret = ExtractedData.NewText(aLine, aOriginalLine);
            }
            //
            return(ret);
        }
        private void ReadingComplete()
        {
            RemoveEmptySources();

            // Check if the sources that are left were all completed, and if not
            // update their error flags.
            foreach (DataSource source in iDataSources)
            {
                Elements.MetaData metaData = source.MetaData;
                if (metaData.IsDataComplete == false)
                {
                    source.AddError(DataSource.TErrorTypes.EErrorTypeDataMissing);
                }
            }
        }