Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to automatically generate c++ headers

Tags:

c++

header

Given foo.hpp

class Foo
{
public:
   void MethodA()
   {
        //BODY IMPLEMENTATION
   }
   int MerhodB()
   {
       return 2+3;
   }
}

I need a tool to generate two files foo.cpp and foo.hpp. Such as

foo.hpp

class Foo
{
public:
   void MethodA();
   int MerhodB();
}

foo.cpp

void Foo::MethodA()
{
     //BODY IMPLEMENTATION
}
int Foo::MerhodB()
{
    return 2+3;
}

I tried Lazy c++ but it is not working for me. Any other suggestions?

Edit: I don't use Windows so please avoid Visual Studio tools. Thanks

like image 656
Dan Paradox Avatar asked May 04 '11 08:05

Dan Paradox


1 Answers

Visual Studio 2005 with Visual Assist X (or newer)

You write everything in the .hpp file and then you can use the "Move implementation to source" refactoring function from the popup menu if you right click on your method.

like image 93
Notinlist Avatar answered Nov 05 '22 04:11

Notinlist