Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Create Implementation for all Class methods

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
TLHobbes Posted - Feb 11 2008 : 7:55:35 PM
It would be nice if one could create implementations for all class methods in one shot.

Perhaps this could be done by adding a refactoring option to Class objects like "Create Implementations" which would call "Create Implementation on each method in the class.

Example:

class Node
{
  public:
    Node();
    ~Node();

    Node* Next();
    void Blah();
};

Refactoring on the class "Node" would give the option "Create Implementions" which would implement the constructor, the destructor, Next() and Blah().

A second request to make this even better:

It would be nice if Create Implementation could detect if there was already an implementation created for a method. If not it functions as normal, else it does not create an implementation but rather it moves to the cursor to the existing implementation.

This would enhance the above request by allowing the global Create Implementations to be used to only create newly added, un-implemented class methods.


Could these things be done via scripting in VS.NET 2005? A script would need to be able to iterate through class methods and check if an implementation for a method already exists.

Thanks!
15   L A T E S T    R E P L I E S    (Newest First)
support Posted - Oct 29 2012 : 11:08:09 AM
case=68802 is fixed in build 1918
feline Posted - Aug 25 2012 : 11:08:57 PM
I am seeing the same effect here. Thank you for the clear description and the instructions:

case=68802
azur Posted - Aug 24 2012 : 02:31:54 AM
File->New->Project: "MFC Application" and <Finish> the Wizard Dialog.

Navigate to "class CViewTree : public CTreeCtrl" and call "Refactor Create Implementation": you will see "GetMessageMap" and "GetThisMessageMap".

Those methods are coming from the "DECLARE_MESSAGE_MAP"-macro.
feline Posted - Aug 21 2012 : 11:15:40 PM
Personally I don't know anything about MFC, so can you help me set up a test case for this? I have created a new, default MFC application in VS2010, but doing a find in files for "CObject" does not find any matches. So if any of the generated classes are derived from CObject, it is not immediately obvious.
GKarRacer Posted - Aug 17 2012 : 2:02:30 PM
I like this new feature, but there is one issue I have with it. I work with a lot of MFC based projects and if a class is indirectly derived from CObject and has one of the typical MFC macros like DECLARE_MESSAGE_MAP or DECLARE_DYNCREATE then the class level Create Implementation feature will implement all of the functions that are actually defined by the macros like:

static CRuntimeClass* PASCAL _GetBaseClass()
static CObject* PASCAL CreateObject()
virtual const AFX_MSGMAP* GetMessageMap() const

These functions already have implementations via the IMPLEMENT_xxx type macros in the source file. As a result you will get unnecessary and duplicate definitions.

Otherwise this feature seems to work great.
KoenTanghe Posted - Aug 09 2012 : 04:13:21 AM
Great, thanks!
support Posted - Aug 09 2012 : 01:46:43 AM
case=1120 is implemented in build 1912
support Posted - Aug 09 2012 : 01:43:53 AM
case=49162 replaces case=1092 and is implemented in build 1912
KoenTanghe Posted - Jan 06 2011 : 04:10:52 AM
Best wishes for you guys! Keep up the good work!
If there's one feature I'd love to see added this year, this would be it ;-) Hope you find some time to do this.
feline Posted - Dec 08 2010 : 1:39:01 PM
Unfortunately this has not yet been done, but we are still looking to add this feature. As you say, it should be quite helpful, and VA Outline is a good way of specifying the methods for refactoring to work on.
KoenTanghe Posted - Dec 06 2010 : 11:42:00 AM
Hi again,
just checking in again, as I've been doing a lot of "define class functionality in .h" --> "now implement it in .cpp" action.
Is this something that is being worked on?
Selecting the functions in the VA Outline view and then calling "create implementation" on each one of them would be very useful.
Thanks,
Koen
KoenTanghe Posted - Jun 24 2010 : 09:51:06 AM
feline,
that would be fine yes.
I usually work from the code text, but VA Outline is good too.
Thanks! I subscribed to this topci so I will know when it's there.
Best,
Koen
feline Posted - Jun 24 2010 : 09:09:07 AM
No progress yet unfortunately, but we are hoping to do this fairly soon. One idea is to use VA Outline, so you can select the methods you want to act on in the outline, and then trigger the refactoring command.
KoenTanghe Posted - Jun 24 2010 : 08:14:42 AM
Hi,
has there been any progress on case 1092?
I was just thinking the exact same thing.
I usually start with laying out my header files, and then start putting the implementations in the corresponding .cpp file.
Now, I need to do this one by one using VAX "Create implementation" on each mehtod.
Would be very nice if I could just do "Create implementation" on either the new class, or on a selection containing multiple methods. The last one would probably be the most flexible (in case you add a set of new methods to your header after you already made some).
Koen
feline Posted - Feb 12 2008 : 1:47:44 PM
We are considering allowing Create Implementation to operate on multiple methods at once:

case=1092

We are also looking into having Create Implementation check if the implementation already exists. This is slightly difficult, due to overloaded functions currently confusing VA's parser, it cannot reliably tell them apart.

case=1120

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