Please consider the following code:
class StaticTest {
public:
protected:
static long _myLong;
};
Encapsulate field produces the following result below the member:
long const& getMyLong() const {
return _myLong;
}
void setMyLong(long const& val) {
_myLong = val;
}
Both methods should have a preceding "static" and the read method can't be const.
BTW, it would be nice if the implementation would be created in the public section (especially if several variables are encapsulated).
F.