• Jason Rhinelander's avatar
    Switched to virtual CRT trampoline class inheritance · 8243ff92
    Jason Rhinelander authored
    Trampoline inheritance is something of a nuissance because all of the
    base class methods need to be repeated.  I was doing this with some
    defines that shoehorned common methods into each Member subclass, but
    that was messy.
    
    This approach (using "Curiously Recursive Templates") is nicer: each
    PyWhatever class is templated with its base class, so that
    PyFirmNoProd<FirmNoProd> ends up with inheritance path:
    
        PyFirmNoProd<FirmNoProd> : PyFirm<FirmNoProd> : PyAgent<FirmNoProd> :
        PyMember<FirmNoProd> : FirmNoProd : Firm : Agent : Member
    
    This is still a lot of duplication, but it's mainly at the compiler
    level which makes maintenance easier and keeps the code a bit cleaner.
    8243ff92
Name
Last commit
Last update
cmake Loading commit data...
package/eris Loading commit data...
pybind11 @ 8fef1b8f Loading commit data...
pyeris Loading commit data...
tests Loading commit data...
.gitmodules Loading commit data...
CMakeLists.txt Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
setup.py.in Loading commit data...