
Encapsulate Field
Encapsulate (Shift+Alt+Q) a member variable to create accessors for it. In C++, encapsulate from a declaration in a header. In C#, encapsulate from a definition in a source file. Encapsulate Field also changes variable references to use the new accessors.
In C++, Encapsulate Field creates inline methods in the header. Follow an encapsulation with another refactoring (Shift+Alt+Q) if you prefer implementations in source files.