Decor (#1235)
Make the `cable_cell` interface read only by passing the decorations to its constructor in a new `decor` type. C++ library * Remove the paint/place/set_default interface from `cable_cell` * Create a `decor` type that: * stores lists of paintings and placings * stores a set of cable cell parameters * uses the `paint`, `place`, `set_default` interface that was deprecated from `cable_cell`. * Create `paintable`, `placeable` and `defaultable` variants that are sum types over the respective types that can be painted, placed and defaulted. * Remove the overloaded `cable_cell::paint`, `cable_cell::place`, `cable_cell::set_default` methods to single methods that consume the sum types. Unit Tests * Many small changes because many many tests use cable cell API. * There were no `cable_cell` unit tests! Not such a big deal, since cable_cell is tested implicitly in so many other tests * but I added cable_cell tests: not much at the moment but will quickly fill up as we work on reading, writing, etc. Python * Wrap the new decor type. * Update cable cell type to reflect read only API. * Wrap the cv_policy types and implement the same operator overloading.
Showing
- .gitignore 4 additions, 0 deletions.gitignore
- arbor/CMakeLists.txt 1 addition, 1 deletionarbor/CMakeLists.txt
- arbor/cable_cell.cpp 53 additions, 32 deletionsarbor/cable_cell.cpp
- arbor/cable_cell_param.cpp 88 additions, 0 deletionsarbor/cable_cell_param.cpp
- arbor/fvm_layout.cpp 2 additions, 2 deletionsarbor/fvm_layout.cpp
- arbor/include/arbor/cable_cell.hpp 18 additions, 72 deletionsarbor/include/arbor/cable_cell.hpp
- arbor/include/arbor/cable_cell_param.hpp 62 additions, 7 deletionsarbor/include/arbor/cable_cell_param.hpp
- arbor/include/arbor/util/typed_map.hpp 2 additions, 2 deletionsarbor/include/arbor/util/typed_map.hpp
- doc/concepts/cable_cell.rst 165 additions, 79 deletionsdoc/concepts/cable_cell.rst
- doc/concepts/cell.rst 8 additions, 5 deletionsdoc/concepts/cell.rst
- doc/concepts/labels.rst 3 additions, 3 deletionsdoc/concepts/labels.rst
- doc/concepts/mechanisms.rst 2 additions, 2 deletionsdoc/concepts/mechanisms.rst
- doc/concepts/morphology.rst 21 additions, 19 deletionsdoc/concepts/morphology.rst
- doc/cpp/cable_cell.rst 25 additions, 34 deletionsdoc/cpp/cable_cell.rst
- doc/internals/util.rst 1 addition, 1 deletiondoc/internals/util.rst
- doc/python/cable_cell.rst 275 additions, 43 deletionsdoc/python/cable_cell.rst
- doc/python/cell.rst 1 addition, 1 deletiondoc/python/cell.rst
- doc/python/hardware.rst 23 additions, 18 deletionsdoc/python/hardware.rst
- doc/python/morphology.rst 5 additions, 3 deletionsdoc/python/morphology.rst
- doc/python/simulation.rst 2 additions, 2 deletionsdoc/python/simulation.rst
Please register or sign in to comment