21 virtual int offset()
const = 0;
int getMergedStoredLength(AbstractRangedChange *change)
Calculates the merge data size, that's required for merging the given change.
Definition: abstractrangedchange.cpp:50
virtual void setDocLength(int value)=0
this method should set the old length
int getMergedDocLength(AbstractRangedChange *change)
Calculates the merged length.
Definition: abstractrangedchange.cpp:28
virtual void mergeStoredData(AbstractRangedChange *change)=0
implement this method to merge to old data. Sample implementation
bool isTouchedBy(AbstractRangedChange *secondChange)
Touched ranges are ranges that are next to eachother Touching means the end offset of one range is th...
Definition: abstractrangedchange.cpp:158
virtual ~AbstractRangedChange()
default destructor is empty
Definition: abstractrangedchange.cpp:13
virtual int docLength() const =0
this method should return the length in the document
void addOffset(int amount)
Adds the given amount to the offset.
Definition: abstractrangedchange.cpp:20
Copyright 2011-2013 - Reliable Bits Software by Blommers IT.
Definition: commentcommand.cpp:22
virtual int offset() const =0
this method should return the offset of the change
bool isOverlappedBy(AbstractRangedChange *secondChange)
This method checks if this textchange is overlapped by the second text change overlapping is an exclu...
Definition: abstractrangedchange.cpp:145
A basic change.
Definition: change.h:18
bool merge(AbstractRangedChange *change)
This method merges the change.
Definition: abstractrangedchange.cpp:118
virtual int storedLength() const =0
this method should return the length of this item in memory
This is an abstract class for ranged changes This are changes (text changes and line changes) that sp...
Definition: abstractrangedchange.h:15
virtual void setOffset(int value)=0
this method should set the offset
void mergeStoredDataViaMemcopy(void *targetData, void *data, void *changeData, AbstractRangedChange *change, int itemSize)
This method merges the data via a memcopy. I really don't like this way of merging the data...
Definition: abstractrangedchange.cpp:91