|
|
|
|
|
by mistrial9
1755 days ago
|
|
I think this approach is working too hard to realize Virtual Tables and Virtual Pointers. Another, different implementation is to define an array of function pointers, one function per method implemented, and then extend the array per subclass; each child class fills in its own or parents function pointers at init time. |
|
For example Linux Kernel style is:
that's all, very straightforward. Also there is no need to prefix the function name with &