eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'Diff3::Chunk':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: Chunk (private in Diff3

This class is only visible from within Diff3.

Inheritance:

   Object
   |
   +--Diff3::Chunk

Package:
stx:libtool
Category:
Collections-Sequenceable-Diff
Owner:
Diff3
Author:
Tony Garnock-Jones <tonyg@lshift.com>

Description:


A Diff3Chunk is a subclass of DiffChunk that also knows which side of a three-way merge it represents.

Instance Variables
    side:           <Symbol> One of #left, #original or #right


[instance variables:]

[class variables:]


Related information:



Class protocol:

as yet unclassified
o  negativeSize: s
Returns a pseudo-chunk with *negative* length, useful as a kind of zero for destructiveMergeWith: operations intended to build up coverage over some set of chunks.

o  offset: o length: l

o  side: aSelector chunk: aChunk


Instance protocol:

accessing
o  correctForSkewFrom: smallerChunk to: biggerChunk
Given a biggerChunk that definitely contains smallerChunk but might have an extra head or tail, updates the receiver to include such an extra head or tail.

o  destructiveMergeWith: aChunk

o  lastIndex
Returns the rightmost index contained in my range. (Offset is the leftmost index.) If my length is zero, will return an index lower than my offset.

o  length

o  length: anObject

o  offset

o  offset: anObject

o  side

o  side: anObject

as yet unclassified
o  = otherChunk
(comment from inherited method)
return true if the receiver and the arg have the same structure.
Notice:
This method is partially open coded (inlined) by the compiler(s)
identical objects are always considered equal.
redefining it may not work as expected.

o  accept: aVisitor

o  extractFrom: aCollection
Extracts a subcollection from aCollection corresponding to my offset and length.

o  extractFrom: aCollection offset: lineOffset
Given a text and lineOffset withing a chunk, return the line

o  extractFromDiff: diff

o  extractResolution

o  printOn: aStream
(comment from inherited method)
append a user printed representation of the receiver to aStream.
The format is suitable for a human - not meant to be read back.

The default here is to output the receiver's class name.
BUT: this method is heavily redefined for objects which
can print prettier.

comparing
o  < aDiffChunk
Used to sort changed chunks during three-way merge; see Diff3

testing
o  isChunk

o  isConflict



ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Thu, 18 Aug 2022 14:33:52 GMT