Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1837: Encapsulate field for static members

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Frunobulax Posted - Jan 24 2011 : 05:51:58 AM
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.
2   L A T E S T    R E P L I E S    (Newest First)
sean Posted - Aug 21 2015 : 12:23:37 AM
case=7857 is implemented in build 2073
feline Posted - Jan 24 2011 : 11:43:16 AM
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

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000