Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 1837: Encapsulate field for static members
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Frunobulax
Ketchup Master

84 Posts

Posted - Jan 24 2011 :  05:51:58 AM  Show Profile  Reply with Quote
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.

"The nice part about being a pessimist
is that you are constantly being either
proven right or pleasantly surprised."
(George F. Will)

feline
Whole Tomato Software

United Kingdom
19021 Posts

Posted - Jan 24 2011 :  11:43:16 AM  Show Profile  Reply with Quote
I am seeing the same effect here. Thank you for the clear description.

case=15983

As for moving the new code into the public section of the class, this is something we are considering:

case=7857

For now are you aware that you can use VA Outline to easily drag and drop the new functions into the position that you want? I know this is not the same, but it is often easier than doing this all in the editor its self.

http://www.wholetomato.com/products/features/vaoutline.asp

zen is the art of being at one with the two'ness
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Aug 21 2015 :  12:23:37 AM  Show Profile  Reply with Quote
case=7857 is implemented in build 2073
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000