Method | Description | |
---|---|---|
AdjustAnalysis ( IStTxtPara para, ITsString oldContents ) : void |
This is the main entry point called by the setter on the StTxtPara.Contents
|
|
AdjustAnalysis ( IStTxtPara para, ITsString oldContents, |
This is the main entry point called by the setter on the StTxtPara.Contents used when the GetDiffsInTsStrings is also needed by another method that is called.
|
|
HandleMoveDest ( IStTxtPara destPara, ITsString oldContents, int ichInsert, int cchInsert, IStTxtPara sourcePara, int ichSource, bool fDestParaIsNew ) : void |
This is a primary entry point for IStTxtPara.SetContentsForMoveDest. It is similar to the top-level AdjustAnalysis, except that we know exactly what was inserted where, AND, we know it came from another paragraph. If the source paragraph is analysed, we can transfer any relevant analysis. Enhance JohnT: Currently this only supports moving from the end of one paragraph to the end of another. This is sufficient for all current usages of the MoveString method which this supports.
|
Method | Description | |
---|---|---|
AdjustAnalysisInternal ( ) : void |
This is the main workhorse for adjusting analyses.
|
|
AdjustReferenceEndPoint ( ISegment seg, IAnalysisReference iar, int newIndex, bool fbeg ) : void | ||
AdjustSegments ( ) : void |
Add any necessary new segments, or delete any unwanted ones. (Todo: salvage free translations etc from deleted ones). Assign analyses to segments if paragraph has them.
|
|
AnalysisAdjuster ( ) : System |
for tests
|
|
AnalysisAdjuster ( IStTxtPara para, ITsString oldContents, |
Make one for adjusting the specified paragraph to its current contents from the specified old contents
|
|
AnalyzeNewText ( ) : void |
This loop reparses m_baseline, determining m_iFirstAnalysisToFix, initializing m_trailingTokens and setting up m_newAnalysisGroups (which gives new Segment boundaries). It also initializes m_newAnalyses with the contents of m_oldAnalyses
|
|
ChangeCanAffectSegments ( ) : bool |
Determine whether the changes to process could change segments or their analyses.
|
|
ChangedToLabelAtBeginSegment ( ) : bool |
Checks changed text to determine if text at the beginning of a segment was changed to a label - will happen if a run of text is changed to verse number or chapter number style.
|
|
CheckForDeleteableIAR ( IAnalysisReference iar, int ifirstAnalysisInSegToFix, int cRemovedAnalyses, int cAddedAnalyses ) : bool |
Delete any IAnalysisReference objects whose begin and end references fall within the range of indices removed and not added back in. Example: Old text: the big red pickup truck New text: the VW Index in Segment: 0 1 2 3 4 This method will delete any objects whose begin AND end references fall within the range 2 to 4 (inclusive). In this example, ifirstAnalysisInSegToFix would be 1.
|
|
CleanupSpuriousWordforms ( ) : void |
If the adjustment resulted in wordforms that are not worth keeping, get rid of them. A wordform is not worth keeping if it - has no analyses - has no incoming references - has a spelling status of unknown
|
|
ComputeRangeOfModifiedSegments ( ) : void | ||
ComputeRequiredBeginOffsets ( ) : void | ||
ConcatenateTranslationsAndNotes ( ISegment destination, ISegment source ) : void | ||
DeleteChartRefs ( IEnumerable |
||
DeleteReferences ( IEnumerable |
||
DeleteTextTags ( IEnumerable |
||
DetermineWhatToMove ( int ichSource, int cchInsert, IStTxtPara source ) : void |
Initialize m_segsToMove and m_analysesToMove from the given source information. Don't modify the source paragraph until this is done.
|
|
DiscardDeletedRefs ( ISegment seg ) : void |
Get rid of IAnalysisReferences that only reference a segment that is being deleted (i.e. reference end points are wholly contained within deleted text)
|
|
DiscardDeletedSegments ( ) : void | ||
DoTheAdjustment ( ) : void |
Common to various ways of initializing the algorithm, this actually figures out what the new state of the paragraph analysis should be.
|
|
EndOfNewSeg ( int iseg ) : int |
Get the end of the specified segment from m_newBeginOffsets or the length of the paragraph if it is the last
|
|
FixHangingReferences ( int iFirstSegmentSurviving, int cOldAnalyses ) : void |
Fix a reference where one (or both of the end points' Segments just got deleted
|
|
FixSingleHangingReference ( int firstSurvivor ) : void | ||
GetBaselineTexts ( ) : void |
Initialize m_baseline to the contents of the segments we have determined need to be processed.
|
|
GetFirstVernacularWs ( ITsString token ) : int | ||
GetLastAnalysisToFix ( int &iTokenIndex ) : int |
Scan the trailing tokens to see which ones occur in the input analysis list. Determine the last one that does not. Also determine the corresponding position in m_trailingTokens.
|
|
GetNewAnalysisGroups ( ) : void |
Initialize m_newAnalyses and m_newAnalysisGroups, the Analyses that should go on each new segment. Also initializes m_cRemovedAnalyses and m_cAddedAnalyses.
|
|
GetNewWordformAnalyses ( int iTokenIndex ) : List |
For each trailing token up to iTokenIndex, find or create a corresponding WfiWordform or PunctuationForm.
|
|
HandleMoveDest ( int cchInsert, IStTxtPara source, int ichSource, bool fParaIsNew ) : void |
This is a primary entry point for IStTxtPara.SetContentsForMoveDest. It is similar to the top-level AdjustAnalysis, except that we know exactly what was inserted where, AND, we know it came from another paragraph. If the source paragraph is analysed, we can transfer any relevant analysis. Enhance JohnT: Currently this only supports moving from the end of one paragraph to the end of another. This is sufficient for all current usages of the MoveString method which this supports.
|
|
InitializeAdjustmentForMove ( ) : void | ||
IsAWordBreak ( int limOldWordform ) : bool |
Answer true if a word must end at the given character index: either the end of the text or a non-wordforming character.
|
|
MoveAnalysisAndReferencesFromOldPara ( int cchInsert, IStTxtPara source, bool fParaIsNew ) : List |
||
MoveReferencesFromOldPara ( ISegment newSeg, int canalysesLeftBehind ) : List |
||
PrintAnalysesInfo ( List |
||
PrintDebugInfo ( ) : void |
This method is available to help display information about how the adjustments are being calculated, it uses several other helper methods to fill out the debug display
|
|
PrintOffsetLines ( string text, int begin, int end ) : void | ||
PrintOneOffsetLine ( string text, int offsetArray, string beginOffsets ) : void | ||
PrintTrailingTokens ( ) : void | ||
SaveAnalysesOfModifiedSegments ( ) : void |
Remember the original analyses of segments we may modify.
|
|
SegmentIsOutsideOfRange ( IAnalysisReference refObj ) : bool | ||
TrimModifiedAnnotationSet ( Set |
Trim down set of AnalysisReference objects to only those referencing segments that are modified. (We aren't deleting them, just narrowing down the ones to possibly update.) NB.: Use this BEFORE modifying the old Segments on the paragraph!
|
|
UpdateAffectedReferences ( ) : void |
Update all IAnalysisReference objects pointing to the segments just modified .
|
public static AdjustAnalysis ( IStTxtPara para, ITsString oldContents ) : void | ||
para | IStTxtPara | |
oldContents | ITsString | |
return | void |
public static AdjustAnalysis ( IStTxtPara para, ITsString oldContents, |
||
para | IStTxtPara | |
oldContents | ITsString | |
diffInfo | ||
return | void |
public static HandleMoveDest ( IStTxtPara destPara, ITsString oldContents, int ichInsert, int cchInsert, IStTxtPara sourcePara, int ichSource, bool fDestParaIsNew ) : void | ||
destPara | IStTxtPara | |
oldContents | ITsString | |
ichInsert | int | |
cchInsert | int | |
sourcePara | IStTxtPara | |
ichSource | int | |
fDestParaIsNew | bool | |
return | void |