Skip to content
Snippets Groups Projects
Unverified Commit ac63809f authored by Benjamin Cumming's avatar Benjamin Cumming Committed by GitHub
Browse files

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.
parent a597ff8d
No related branches found
No related tags found
No related merge requests found
Showing
with 761 additions and 326 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment