From: <bl...@us...> - 2003-04-06 18:07:02
|
Update of /cvsroot/cpptool/rfta/include/rfta/refactoring In directory sc8-pr-cvs1:/tmp/cvs-serv21204/include/rfta/refactoring Modified Files: CodeModelExpressions.h CodeModelForward.h Log Message: * added support for inserting multiple variable declarations Index: CodeModelExpressions.h =================================================================== RCS file: /cvsroot/cpptool/rfta/include/rfta/refactoring/CodeModelExpressions.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** CodeModelExpressions.h 6 Apr 2003 07:42:16 -0000 1.14 --- CodeModelExpressions.h 6 Apr 2003 18:06:59 -0000 1.15 *************** *** 92,117 **** ! class RFTA_API Declarator { public: ! Declarator( const std::string &type, ! const std::string &name, ! const std::string &typeSuffix ); ! Declarator( const std::string &type, ! const std::string &name, ! const std::string &typeSuffix, const ExpressionPtr &initializer ); virtual ~Declarator(); ! std::string getType() const; ! void setType( const std::string &type ); ! std::string getTypeSuffix() const; ! void setTypeSuffix( const std::string &typeSuffix ); ! std::string getName() const; ! void setName( const std::string &name ); bool hasInitializer() const; --- 92,129 ---- ! class RFTA_API Identifier : public Element { public: ! Identifier( const std::string &identifier = "" ); ! std::string getIdentifier() const; ! ! private: ! std::string identifier_; ! }; ! ! ! class RFTA_API Declarator : public Element ! { ! public: ! Declarator( const TypePartPtr &type, ! const IdentifierPtr &name, ! const TypePartPtr &typeSuffix ); ! ! Declarator( const TypePartPtr &type, ! const IdentifierPtr &name, ! const TypePartPtr &typeSuffix, const ExpressionPtr &initializer ); virtual ~Declarator(); ! TypePartPtr getType() const; ! void setType( const TypePartPtr &type ); ! TypePartPtr getTypeSuffix() const; ! void setTypeSuffix( const TypePartPtr &typeSuffix ); ! IdentifierPtr getName() const; ! void setName( const IdentifierPtr &name ); bool hasInitializer() const; *************** *** 119,126 **** void setInitializer( const ExpressionPtr &initializer ); private: ! std::string type_; ! std::string name_; ! std::string typeSuffix_; ExpressionPtr initializer_; }; --- 131,141 ---- void setInitializer( const ExpressionPtr &initializer ); + // overridden from Element + void accept( ElementVisitor &visitor ); + private: ! TypePartPtr type_; ! IdentifierPtr name_; ! TypePartPtr typeSuffix_; ExpressionPtr initializer_; }; Index: CodeModelForward.h =================================================================== RCS file: /cvsroot/cpptool/rfta/include/rfta/refactoring/CodeModelForward.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** CodeModelForward.h 6 Apr 2003 07:20:23 -0000 1.13 --- CodeModelForward.h 6 Apr 2003 18:06:59 -0000 1.14 *************** *** 15,18 **** --- 15,19 ---- class Label; class TypePart; + class Identifier; class BreakStatement; *************** *** 70,73 **** --- 71,75 ---- typedef boost::shared_ptr<Label> LabelPtr; typedef boost::shared_ptr<TypePart> TypePartPtr; + typedef boost::shared_ptr<Identifier> IdentifierPtr; typedef boost::shared_ptr<DeclaratorExpression> DeclaratorExpressionPtr; typedef boost::shared_ptr<Expression> ExpressionPtr; |