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
 Can't move function implementation to header
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

legalize
Tomato Guru

USA
119 Posts

Posted - Jul 30 2014 :  11:50:46 PM  Show Profile  Reply with Quote
leap.h:
#if !defined(LEAP_H)
#define LEAP_H

namespace leap
{

extern bool is_leap_year(int year);

}

#endif


leap.cpp:
#include "leap.h"

namespace leap
{

extern bool is_leap_year(int year)
{
    return (year % 100) ? (year % 4 == 0) : (year % 400 == 0);
}

}


VAX won't let me move the implementation from the .cpp file to the .h file.

http://legalizeadulthood.wordpress.com

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Jul 31 2014 :  3:16:04 PM  Show Profile  Reply with Quote
We don't currently have a refactoring command to move the implementation to the header file, but we are looking to add this ability:

case=10239

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

legalize
Tomato Guru

USA
119 Posts

Posted - Jul 31 2014 :  4:18:52 PM  Show Profile  Reply with Quote
So the existing one only moves implementation from header to source?

Yep, looks like it.

Refactorings should be reversible, without relying on editor undo.

http://legalizeadulthood.wordpress.com
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Jul 31 2014 :  9:28:09 PM  Show Profile  Reply with Quote
Which is why we are looking to add this ability, but we have not gotten there yet. One reason for this is that there is a lot of interest in moving the implementation into the cpp file, but much less interest in moving it back into the header file. We have to prioritise our work somehow, and interest level is a consideration.

If you want to place the implementation into the header file, but outside of the class declaration, then you can cut and paste the implementation, and VA Outline can help you here.

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 - Jul 18 2016 :  10:53:31 PM  Show Profile  Reply with Quote
case=10239 is implemented in build 2107.
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