2 // Copyright © 2009 The University of Chicago
14 class CEdge
: public CParse
18 int m_DotLocation
;// the number of the Parse piece to the right of the dot.
19 double m_X
, m_Y
; // coordinates for display;
23 Q3PtrList
<Q3CanvasItem
> m_CanvasItems
;
28 Q3PtrList
<CEdge
> m_Daughters
;
34 CEdge( CGrammarRule
*, CParse
*, int DotLocation
);
35 CEdge( CParse
& Cat
, QString Word
, int i
, int End
); // for Scanner
39 void SetDotLocation(int n
);
40 void SetEnd (int n
) { m_End
= n
; }
45 CStringSurrogate
GetLHS();
46 void SetLHS( QString
);
51 CStringSurrogate
GetNextNode(); // the one to the right of the dot, which is m_DotLocation + 1;
52 void SetStart(int n
);
53 void GetParse( CParse
*, bool clearParse
= TRUE
);
54 int getDepth() const { return m_Depth
; }
55 void setDepth( int d
) { m_Depth
= d
; }
58 void MoveDotToTheRight();
59 bool NextNodeIsNonterminal();
60 bool NextNodeIsTerminal();
63 QString
DisplayParse( QMap
<QString
, QString
>* filter
= NULL
);
64 QRect
drawTree( Q3Canvas
*, int, int, QMap
<QString
, QString
>* filter
= NULL
);
65 void shiftTree( Q3Canvas
*, int, int );
66 int getMinimumLength() { return m_MinimumLength
; }
67 void setMinimumLength( int, QMap
<QString
,int>* = NULL
);