Slick V3.3 manual 37. C++ Refactoring Pull Up Selecting Members to Move

Models: V3.3

1 568
Download 568 pages 2.03 Kb
Page 228
Image 228

C++ Refactoring

Class members are pulled up one level at a time. Constructors and destructors cannot be moved. Any de- pendencies that are not part of the original class will not be moved to the new base class, and might not be accessible, thereby causing compilation errors. This occurs, for example, when a function being moved uses a static global variable that is defined in the original class' .cpp file when the definitions are moved to a different .cpp file.

Figure 6.37. C++ Refactoring: Pull Up - Selecting Members to Move

206

Page 228
Image 228
Slick V3.3 manual 37. C++ Refactoring Pull Up Selecting Members to Move