|
From: <bl...@us...> - 2003-03-16 13:44:27
|
Update of /cvsroot/cpptool/rfta/include/rfta/refactoring
In directory sc8-pr-cvs1:/tmp/cvs-serv2880/include/rfta/refactoring
Modified Files:
CodeModel.h CodeModelElement.h CodeModelExpressions.h
Log Message:
* refactored: inlined class ElementText in Element and renamed methods.
Index: CodeModel.h
===================================================================
RCS file: /cvsroot/cpptool/rfta/include/rfta/refactoring/CodeModel.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CodeModel.h 22 Dec 2002 11:43:15 -0000 1.1
--- CodeModel.h 16 Mar 2003 13:44:24 -0000 1.2
***************
*** 53,56 ****
--- 53,58 ----
private:
+ void setElementSource( Element &element, const ASTNodePtr &node );
+
const std::string getDeclaratorPrimaryType( const ASTNodePtr &declaratorNode );
const Declarator makeVariableDeclarator( const ASTNodePtr &variableDeclaratorNode );
Index: CodeModelElement.h
===================================================================
RCS file: /cvsroot/cpptool/rfta/include/rfta/refactoring/CodeModelElement.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** CodeModelElement.h 16 Mar 2003 13:15:06 -0000 1.6
--- CodeModelElement.h 16 Mar 2003 13:44:24 -0000 1.7
***************
*** 14,39 ****
- class ElementText
- {
- public:
- ElementText();
- explicit ElementText( const ASTNodePtr &node );
- explicit ElementText( const std::string &text );
-
- // void setText( const std::string &newText );
-
- const std::string getOriginalText() const;
-
- const SourceRange getOriginalSourceRange() const;
-
- bool hasOriginalSourceRange() const;
-
- private:
- ASTNodePtr node_;
- std::string newText_;
- bool hasNewText_;
- };
-
-
class Change
{
--- 14,17 ----
***************
*** 92,104 ****
virtual ~Element();
! void setOriginalText( const ElementText &text );
! // void setText( const std::string &text );
! const ElementText &getText() const;
private:
virtual void originalTextSet();
! ElementText text_;
};
--- 70,94 ----
virtual ~Element();
! /// Indicates if the elements was created by the parser (if so, then it has a source range).
! bool isFromSource() const;
! /** Returns the source text for this element.
! * \return Source text for this element if it was parsed, otherwise returns an empty string.
! */
! const std::string getSourceText() const;
!
! /** Returns the source range for this element.
! * \return Source range of this element if it was parser, an empty source range otherwise.
! */
! const SourceRange getSourceRange() const;
!
! /** Set the source for this element.
! */
! void setSource( const ASTNodePtr &node );
private:
virtual void originalTextSet();
! ASTNodePtr node_;
};
Index: CodeModelExpressions.h
===================================================================
RCS file: /cvsroot/cpptool/rfta/include/rfta/refactoring/CodeModelExpressions.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** CodeModelExpressions.h 16 Mar 2003 13:15:07 -0000 1.7
--- CodeModelExpressions.h 16 Mar 2003 13:44:24 -0000 1.8
***************
*** 31,35 ****
GenericExpression( const std::string &value = "" );
! const std::string getTextValue() const;
void setValueText( const std::string &value );
--- 31,35 ----
GenericExpression( const std::string &value = "" );
! const std::string getValueText() const;
void setValueText( const std::string &value );
|