how to generate class with virtual functions using nim, like this?
Myclass
{
public:
virtual void Setup()
{
}
virtual void Start()
{
}
virtual void Stop()
{
}
};
it seems to have written about it here, but I don't understand anything https://github.com/nim-lang/Nim/wiki/Playing-with-CPP--VTABLE-from-Nim
The wiki page you're linking to is an advanced concept to use C++ VTable from NIM, i.e. it's foreign function interface, not pure Nim.
The equivalent of virtual function in Nim are methods, the base type should be a ref MyBase of RootObj and it can be inherited with a ref MyClass of MyBase.