DALine.h #2

  • //
  • guest/
  • sam_stafford/
  • deepannotate/
  • DALine.h
  • View
  • Commits
  • Open Download .zip Download (820 B)
class DAFile;
class DATooth;

class DALine
{
public:
	DALine( DAFile* file, int text, int up, int low );
	~DALine(void);

	int text() { return textID; };
	int upperRev() { return upper; };
	int lowerRev() { return lower; };

	DAFile* getFile() { return file; };

	DALine* nextLine() { return next; };
	DALine* prevLine() { return prev; };

	DALine* nextAsOf( int rev );
	DALine* prevAsOf( int rev );

	DALine* nextToothed();
	DALine* prevToothed();

	void prependLine( DALine* line );

	void setTooth( DATooth* t ) { tooth = t; };
	DATooth* getTooth() { return tooth; };

	bool zipped() { return anc != 0x0; };
	DALine* ancestor();
	void setAncestor( DALine* a ) { if ( !anc ) anc = a; };

private:
	int textID;

	int upper;
	int lower;

	DALine* prev;
	DALine* next;

	DAFile* file;

	DALine* anc;

	DATooth* tooth;
};
# Change User Description Committed
#2 6299 Sam Stafford Ditch the attempts at only processing lines that have already been
connected to the starting file.  It seemed to be causing more
backtracking than anything else when the history was complex, and
iterating through all files/revisions works just as well and isn't
nearly as prone to duplicating work.
#1 6297 Sam Stafford Work so far on "deep annotate".
 Been getting a lot of questions on
this lately from other people working on the same thing; might as well
pool efforts.