CDT C++ Refactorings

Indermühle, Matthias and Knöpfel, Roger (2010) CDT C++ Refactorings. Bachelor thesis, HSR Hochschule für Technik Rapperswil.

[img]
Preview
PDF
cdt_c++.pdf - Supplemental Material

Download (1MB) | Preview
  • PDF
    HCID_Smartcallhome_Doc_20100122f-public.pdf - Supplemental Material

Abstract

Refactoring existing code is a key element in almost all modern software development. Typically, this is performed using tools of an integrated development environment, since manual changes are slow and error prone. The "C/C++ Development Tooling" plug-in for Eclipse (CDT) lacks some important refactoring tools. We have already developed the "Introduce PImpl" refactoring in our semester thesis at the IFS in 2009 and our goal for this bachelor thesis is to further expand the refactoring abilities of CDT. Most C++ functions provide one or more declarations in separate (Header) files in addition to their definition. If the function signature must be changed the programmer has to edit code in these files and also the calling sites accordingly. This is annoying and increases the risk for mistakes. With our refactorings, the software developer specifies a single change that is properly applied to all the relevant parts of code. To get an easier start with the Eclipse framework we began with a rather simple refactoring called "Declare Function" that offers the possibility to create a function declaration within a header file based on the function's definition. It is the counterpart to the already existing "Implement Method" (sic) refactoring. Our main feature "Change Function Signature" allows changing the signature of a function with a very simple and yet powerful wizard. The user can add, remove or rearrange parameters, modify the return type and choose to apply those changes to its super- or subclass, instead of manually rewriting the definition, the declaration and all callers. Both our refactorings combined with "Implement Method" frees C++ developers from the burden of having to change code in multiple files, when extending or changing a class' interface.

Item Type: Thesis (Bachelor)
Subjects: Topics > Software > Refactoring
Technologies > Programming Languages > C++
Technologies > Frameworks and Libraries > Eclipse
Metatags > IFS (Institute for Software)
Divisions: Bachelor of Science FHO in Informatik > Bachelor Thesis
Creators:
CreatorsEmail
Indermühle, MatthiasUNSPECIFIED
Knöpfel, RogerUNSPECIFIED
Contributors:
ContributionNameEmail
Thesis advisorSommerlad, PeterUNSPECIFIED
ExpertBotzler, MartinUNSPECIFIED
Depositing User: HSR Deposit User
Date Deposited: 24 Jul 2012 07:56
Last Modified: 24 Jul 2012 09:35
URI: http://eprints.hsr.ch/id/eprint/79

Actions (login required)

View Item View Item