sg-s / xolotl

A MATLAB neuron simulator. Very fast (written in C++). Flexible (fully object oriented). Immediate (live manipulation in MATLAB). Comes with a powerful parameter optimizer. Get started ➡️
https://go.brandeis.edu/xolotl
GNU General Public License v3.0
43 stars 8 forks source link

Overhaul virtual functions in abstract classes to remove a bunch of boilerplate code from mechanisms #545

Closed sg-s closed 3 years ago

sg-s commented 3 years ago

For example, the virtual connect methods in mechanism are never called, even when they should be. Instead of getting a runtime error with useful information, we get a compile-time error.

sg-s commented 3 years ago

No, only connect() isn't doing its job, possibly because there are 3 different connect functions, and name mangling doesn't work the way I expect it to

sg-s commented 3 years ago

But maybe a compile time error is preferable? The error message is more obscure, but it happens earlier...

sg-s commented 3 years ago

The "correct" way to fix this would be to change all the connect methods to have differnet names...

sg-s commented 3 years ago

OK, renaming the connect methods fixes this -- confirming that it was a name mangling issue. Now we need to overhaul all mechanisms to support the new method names.