//--------------------------------------------------------------------// // C o n s t r u c t o r // // P r n P a r s e L i n k D a t a // // // //--------------------------------------------------------------------// public PrnParseLinkData( PrnParse analysisOwner, Int32 analysisLevel, Int32 macroLevel, PCLXLOperators.eEmbedDataType pclxlEmbedType) { _analysisOwner = analysisOwner; _analysisLevel = analysisLevel; _macroLevel = macroLevel; _pclxlEmbedType = pclxlEmbedType; _contType = PrnParseConstants.eContType.None; _prefixLen = 0; _dataLen = 0; _downloadRem = 0; _entryCt = 0; _entryNo = 0; _entryRem = 0; _entrySz1 = 0; _entrySz2 = 0; _backTrack = false; _prefixA = 0x00; _prefixB = 0x00; _eof = false; _fileSize = 0; _makeOvlOffset = 0; _makeOvlSkipBegin = -1; _makeOvlSkipEnd = -1; _makeOvlAct = PrnParseConstants.eOvlAct.None; _makeOvlPos = PrnParseConstants.eOvlPos.BeforeFirstPage; _makeOvlShow = PrnParseConstants.eOvlShow.None; _makeOvlMacroId = -1; _makeOvlStreamName = ""; _makeOvlPageMark = false; _makeOvlXL = false; _makeOvlEncapsulate = false; _pclComboStart = -1; _pclComboSeq = false; _pclComboFirst = false; _pclComboLast = false; _pclComboModified = false; _prescribeSCRC = PrnParseConstants.prescribeSCRCDefault; _prescribeIntroRead = false; }
//--------------------------------------------------------------------// // M e t h o d // // a d d D a t a R o w // //--------------------------------------------------------------------// // // // Adds a row, with numeric offset value, to the output table. // // // //--------------------------------------------------------------------// public static void addDataRow( PrnParseRowTypes.eType rowType, DataTable table, PrnParseConstants.eOvlShow makeOvlShow, PrnParseConstants.eOptOffsetFormats indxOffsetFormat, Int32 offset, Int32 level, String type, String seq, String desc) { if (_parseType == PrnParse.eParseType.ScanForPDL) { //------------------------------------------------------------// // // // Output inhibited. // // // //------------------------------------------------------------// } else if ((_parseType == PrnParse.eParseType.MakeOverlay) && (makeOvlShow == PrnParseConstants.eOvlShow.None)) { //------------------------------------------------------------// // // // Output inhibited. // // // //------------------------------------------------------------// } else if ((!_showMacroData) && (_macroLevel > 0)) { //------------------------------------------------------------// // // // Output inhibited (e.g. don't show PCL macro contents); do // // nothing. // // // //------------------------------------------------------------// } else { DataRow row; String offsetText; row = table.NewRow(); if (offset < 0) { if (offset == (Int32)PrnParseConstants.eOffsetPosition.StartOfFile) { offsetText = "<Start>"; } else if (offset == (Int32)PrnParseConstants.eOffsetPosition.EndOfFile) { offsetText = "<End>"; } else { offsetText = ""; } } else { if (indxOffsetFormat == PrnParseConstants.eOptOffsetFormats.Decimal) { if (level == 0) { offsetText = String.Format("{0:d10}", offset); } else { offsetText = String.Format("{0:d2}", level) + ":" + String.Format("{0:d10}", offset); } } else { if (level == 0) { offsetText = String.Format("{0:x8}", offset); } else { offsetText = String.Format("{0:x2}", level) + ":" + String.Format("{0:x8}", offset); } } } if ((_parseType == PrnParse.eParseType.MakeOverlay) && (makeOvlShow != PrnParseConstants.eOvlShow.None)) { row[_colName_Action] = makeOvlShow.ToString(); } row[_colName_RowType] = (Int32)rowType; // row[_colName_RowType] = rowType.ToString(); // **** DIAG ************ row[_colName_Offset] = offsetText; row[_colName_Type] = type; row[_colName_Seq] = seq; row[_colName_Desc] = desc; table.Rows.Add(row); } }
//--------------------------------------------------------------------// // M e t h o d // // a d d T e x t R o w // //--------------------------------------------------------------------// // // // Adds a row, without numeric offset value, to the output table. // // // //--------------------------------------------------------------------// public static void addTextRow( PrnParseRowTypes.eType rowType, DataTable table, PrnParseConstants.eOvlShow makeOvlShow, String offsetText, String type, String seq, String desc) { if (_parseType == PrnParse.eParseType.ScanForPDL) { //------------------------------------------------------------// // // // Output inhibited. // // // //------------------------------------------------------------// } else if ((_parseType == PrnParse.eParseType.MakeOverlay) && (makeOvlShow == PrnParseConstants.eOvlShow.None)) { //------------------------------------------------------------// // // // Output inhibited. // // // //------------------------------------------------------------// } else if ((!_showMacroData) && (_macroLevel > 0)) { //------------------------------------------------------------// // // // Output inhibited (e.g. don't show PCL macro contents); do // // nothing. // // // //------------------------------------------------------------// } else { DataRow row; row = table.NewRow(); if (_parseType == PrnParse.eParseType.MakeOverlay) { if (makeOvlShow == PrnParseConstants.eOvlShow.Insert) { row[_colName_Action] = "Insert"; } else { row[_colName_Action] = ""; } } row[_colName_RowType] = (Int32)rowType; // row[_colName_RowType] = rowType.ToString(); // **** DIAG ************ row[_colName_Offset] = offsetText; row[_colName_Type] = type; row[_colName_Seq] = seq; row[_colName_Desc] = desc; table.Rows.Add(row); } }