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
 Feature Requests
 Create stubs for unimplemented methods.
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

GennadiyKorol
Ketchup Master

Israel
54 Posts

Posted - Mar 21 2009 :  08:46:07 AM  Show Profile  Reply with Quote
This might have already been requested, but sometimes it is very convenient to add implementation/declaration stubs for yet undefined methods from the context of their usage.

For instance:


class Banana {public:};
class Person {public:};
...


void foo()
{
    Person bob;
    Banana banana;
   
    // Right click over peel can suggest creating a stub for
    // Person::peel(Banana & banana)
    bob.peel(banana);
}


// Now Person class looks like this:
class Person {
   public:
     void peel(Banana & banana);
}

// The stub could also understand return values from context:
class PeeledBanana {
};

void foo() 
{
   Person bob;
   Banana banana;
   
   // Same as before, but return type is now PeeledBanana and not void.
   PeeledBanana peeled = bob.peel(banana);
}



This allows writing code that uses functions before they are even defined and quickly create their implementation stubs on the fly.

Correctness might be a theoretical concept but incorrectness has practical implications.

Edited by - GennadiyKorol on Mar 21 2009 08:48:20 AM

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Mar 22 2009 :  11:29:02 AM  Show Profile  Reply with Quote
We are planning to do this:

case=2451
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