Update of /cvsroot/cpptool/rfta/include/rfta/refactoring
In directory sc8-pr-cvs1:/tmp/cvs-serv26062/include/rfta/refactoring
Modified Files:
CodeModelElement.h CodeModelExpressions.h CodeModelForward.h
CodeModelStatements.h CodeModelVisitor.h
Log Message:
* introduced ElementVisitor
* added tests for IfStatement and fixed a bug
* prepared some rewriter refactoring
Index: CodeModelElement.h
===================================================================
RCS file: /cvsroot/cpptool/rfta/include/rfta/refactoring/CodeModelElement.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** CodeModelElement.h 16 Mar 2003 15:33:09 -0000 1.10
--- CodeModelElement.h 16 Mar 2003 16:18:39 -0000 1.11
***************
*** 40,43 ****
--- 40,45 ----
void setSource( const ASTNodePtr &node );
+ virtual void accept( ElementVisitor &visitor );
+
private:
/** Called after setSource() is called.
Index: CodeModelExpressions.h
===================================================================
RCS file: /cvsroot/cpptool/rfta/include/rfta/refactoring/CodeModelExpressions.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** CodeModelExpressions.h 16 Mar 2003 13:51:06 -0000 1.9
--- CodeModelExpressions.h 16 Mar 2003 16:18:39 -0000 1.10
***************
*** 22,25 ****
--- 22,27 ----
virtual ~Expression();
+ void accept( ElementVisitor &visitor );
+
virtual void accept( ExpressionVisitor &visitor ) =0;
};
Index: CodeModelForward.h
===================================================================
RCS file: /cvsroot/cpptool/rfta/include/rfta/refactoring/CodeModelForward.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** CodeModelForward.h 16 Mar 2003 15:33:09 -0000 1.7
--- CodeModelForward.h 16 Mar 2003 16:18:39 -0000 1.8
***************
*** 12,15 ****
--- 12,16 ----
namespace Refactoring { namespace CodeModel {
+ class Change;
class Element;
class Label;
***************
*** 48,51 ****
--- 49,53 ----
class ExpressionVisitor;
class StatementVisitor;
+ class ElementVisitor;
typedef boost::shared_ptr<Element> ElementPtr;
Index: CodeModelStatements.h
===================================================================
RCS file: /cvsroot/cpptool/rfta/include/rfta/refactoring/CodeModelStatements.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** CodeModelStatements.h 16 Mar 2003 15:43:09 -0000 1.12
--- CodeModelStatements.h 16 Mar 2003 16:18:39 -0000 1.13
***************
*** 22,25 ****
--- 22,27 ----
virtual ~Statement();
+ void accept( ElementVisitor &visitor );
+
virtual void accept( StatementVisitor &visitor ) =0;
};
***************
*** 82,85 ****
--- 84,89 ----
void setCondition( const ExpressionPtr &condition );
+
+ Change getConditionChange() const;
// overriden from Statement
Index: CodeModelVisitor.h
===================================================================
RCS file: /cvsroot/cpptool/rfta/include/rfta/refactoring/CodeModelVisitor.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** CodeModelVisitor.h 22 Dec 2002 11:44:01 -0000 1.2
--- CodeModelVisitor.h 16 Mar 2003 16:18:39 -0000 1.3
***************
*** 58,61 ****
--- 58,66 ----
+ class ElementVisitor : public StatementVisitor
+ , public ExpressionVisitor
+ {
+ };
+
} // namespace CodeModel
} // namespace Refactoring
|