From: <bl...@us...> - 2003-03-15 21:51:46
|
Update of /cvsroot/cpptool/rfta/include/rfta/refactoring In directory sc8-pr-cvs1:/tmp/cvs-serv13677/include/rfta/refactoring Modified Files: CodeModelStatements.h Log Message: * added support for inserting label and goto statements. Index: CodeModelStatements.h =================================================================== RCS file: /cvsroot/cpptool/rfta/include/rfta/refactoring/CodeModelStatements.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** CodeModelStatements.h 12 Mar 2003 07:46:09 -0000 1.4 --- CodeModelStatements.h 15 Mar 2003 21:51:42 -0000 1.5 *************** *** 222,238 **** ! class LabelStatement : public Statement { public: ! LabelStatement( const std::string &labelName ); const std::string getLabelName() const; void setLabelName( const std::string &labelName ); // overriden from Statement void accept( StatementVisitor &visitor ); ! private: ! std::string labelName_; }; --- 222,269 ---- ! class FlowControlStatement : public Statement { public: ! // overriden from Statement ! void accept( StatementVisitor &visitor ); ! }; ! ! ! class LabelHolderStatement ! { ! public: ! LabelHolderStatement( const std::string &labelName ); ! ! virtual ~LabelHolderStatement() ! { ! } const std::string getLabelName() const; void setLabelName( const std::string &labelName ); + private: + std::string labelName_; + }; + + + class LabelStatement : public Statement + , public LabelHolderStatement + { + public: + LabelStatement( const std::string &labelName ); + // overriden from Statement void accept( StatementVisitor &visitor ); + }; ! ! class GotoStatement : public FlowControlStatement ! , public LabelHolderStatement ! { ! public: ! GotoStatement( const std::string &labelName ); ! ! // overriden from Statement ! void accept( StatementVisitor &visitor ); }; *************** *** 270,281 **** - class FlowControlStatement : public Statement - { - public: - // overriden from Statement - void accept( StatementVisitor &visitor ); - }; - - class BreakStatement : public FlowControlStatement { --- 301,304 ---- *************** *** 315,326 **** ExpressionPtr value_; Change change_; - }; - - - class GotoStatement : public FlowControlStatement - { - public: - // overriden from Statement - void accept( StatementVisitor &visitor ); }; --- 338,341 ---- |