It's a simple python script to generate c++ classes from .hh declaration.
The following Test.hh file...
#ifndef TEST_H_
# define TEST_H_
class Test
{
private:
std::string const _name;
public:
Test(std::string const & name);
~Test();
public:
std::string const & getName() const;
};
#endif
... generate the following output:
#include "Test.hh"
Test::Test(std::string const & name)
: _name(name)
{
}
Test::~Test()
{
}
std::string const & Test::getName() const
{
return _name;
}
You can try the dog.hh example at the root of this repository :)
$ cppgen dog.hh > dog.cpp
- The corresponding sublime text plugin
- Do not generate pure virtual classes
- Handle namespaces and multi-classes
- Ideas ?