diff options
| author | Neil <nyamatongwe@gmail.com> | 2018-03-03 13:42:08 +1100 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2018-03-03 13:42:08 +1100 | 
| commit | ddbc7d46f93d87773a2713281591fc4e9c5baeca (patch) | |
| tree | ddeb72687d7c6a5548253a21ad44863a14c1fef8 /src/CellBuffer.h | |
| parent | 37ae7ea7fcfca313265d85bb4bc9e56b0f29fd82 (diff) | |
| download | scintilla-mirror-ddbc7d46f93d87773a2713281591fc4e9c5baeca.tar.gz | |
Split LineVector into interface and implementation classes to allow future
choice between 32-bit and 64-bit position implementations.
Diffstat (limited to 'src/CellBuffer.h')
| -rw-r--r-- | src/CellBuffer.h | 32 | 
1 files changed, 3 insertions, 29 deletions
| diff --git a/src/CellBuffer.h b/src/CellBuffer.h index 7c999a36e..544a26711 100644 --- a/src/CellBuffer.h +++ b/src/CellBuffer.h @@ -22,33 +22,7 @@ public:  /**   * The line vector contains information about each of the lines in a cell buffer.   */ -class LineVector { - -	Partitioning<int> starts; -	PerLine *perLine; - -public: - -	LineVector(); -	// Deleted so LineVector objects can not be copied. -	LineVector(const LineVector &) = delete; -	void operator=(const LineVector &) = delete; -	~LineVector(); -	void Init(); -	void SetPerLine(PerLine *pl); - -	void InsertText(Sci::Line line, Sci::Position delta); -	void InsertLine(Sci::Line line, Sci::Position position, bool lineStart); -	void SetLineStart(Sci::Line line, Sci::Position position); -	void RemoveLine(Sci::Line line); -	Sci::Line Lines() const { -		return starts.Partitions(); -	} -	Sci::Line LineFromPosition(Sci::Position pos) const; -	Sci::Position LineStart(Sci::Line line) const { -		return starts.PositionFromPartition(line); -	} -}; +class ILineVector;  enum actionType { insertAction, removeAction, startAction, containerAction }; @@ -142,7 +116,7 @@ private:  	bool collectingUndo;  	UndoHistory uh; -	LineVector lv; +	std::unique_ptr<ILineVector> plv;  	bool UTF8LineEndOverlaps(Sci::Position position) const;  	void ResetLineEnds(); @@ -175,7 +149,7 @@ public:  	void SetPerLine(PerLine *pl);  	Sci::Line Lines() const;  	Sci::Position LineStart(Sci::Line line) const; -	Sci::Line LineFromPosition(Sci::Position pos) const { return lv.LineFromPosition(pos); } +	Sci::Line LineFromPosition(Sci::Position pos) const;  	void InsertLine(Sci::Line line, Sci::Position position, bool lineStart);  	void RemoveLine(Sci::Line line);  	const char *InsertString(Sci::Position position, const char *s, Sci::Position insertLength, bool &startSequence); | 
