diff options
author | Jonas Finnemann Jensen <jopsen@gmail.com> | 2010-10-03 16:16:52 +0200 |
---|---|---|
committer | Jonas Finnemann Jensen <jopsen@gmail.com> | 2010-10-03 16:16:52 +0200 |
commit | befebfbf3690989e0eb08dab34b0e8505850760d (patch) | |
tree | 828a5697ab51008f635eb236db63250b79e86bf0 /starmath/inc/visitors.hxx | |
parent | 8c340c4270c3e955862f4f56be9fc135a3c2cc43 (diff) |
Fixed issue with moving in/out of binom and stack.
Rewrote handling of SmTableNode in SmCaretPosGraphBuildingVisitor,
so that the special case where NTABLE is used as root node is handled
in the constructor, and NSTACK and NBINOM is handled in the visiting
method.
Diffstat (limited to 'starmath/inc/visitors.hxx')
-rw-r--r-- | starmath/inc/visitors.hxx | 43 |
1 files changed, 21 insertions, 22 deletions
diff --git a/starmath/inc/visitors.hxx b/starmath/inc/visitors.hxx index e2be49dedf98..bb4ee155fc3a 100644 --- a/starmath/inc/visitors.hxx +++ b/starmath/inc/visitors.hxx @@ -276,31 +276,30 @@ private: /////////////////////////////// SmCaretPosGraphBuildingVisitor //////////////////////////////// -/** A visitor for building a SmCaretPosGraph */ +/** A visitor for building a SmCaretPosGraph + * + * Visit invariant: + * Each pNode, except SmExpressionNode, SmBinHorNode and a few others, constitues an entry + * in a line. Consider the line entry "H", this entry creates one carat position, here + * denoted by | in "H|". + * + * Parameter variables: + * The following variables are used to transfer parameters in to calls and results out + * of calls. + * pRightMost : SmCaretPosGraphEntry* + * + * Prior to a Visit call: + * pRightMost: A pointer to right most position infront of the current line entry. + * + * After a Visit call: + * pRightMost: A pointer to the right most position in the called line entry, if no there's + * no caret positions in called line entry don't change this variable. + */ class SmCaretPosGraphBuildingVisitor : public SmVisitor { public: - SmCaretPosGraphBuildingVisitor( ){ - pRightMost = NULL; - pGraph = new SmCaretPosGraph( ); - } - /* Visit invariant: - * Each pNode, except SmExpressionNode, SmBinHorNode and a few others, constitues an entry - * in a line. Consider the line entry "H", this entry creates one carat position, here - * denoted by | in "H|". - * - * Parameter variables: - * The following variables are used to transfer parameters in to calls and results out - * of calls. - * pRightMost : SmCaretPosGraphEntry* - * - * Prior to a Visit call: - * pRightMost: A pointer to right most position infront of the current line entry. - * - * After a Visit call: - * pRightMost: A pointer to the right most position in the called line entry, if no there's - * no caret positions in called line entry don't change this variable. - */ + /** Builds a caret position graph for pRootNode */ + SmCaretPosGraphBuildingVisitor( SmNode* pRootNode ); void Visit( SmTableNode* pNode ); void Visit( SmBraceNode* pNode ); void Visit( SmBracebodyNode* pNode ); |