gnuradio / newsched

The GNU Radio 4.0 Runtime Proof Of Concept
GNU General Public License v3.0
22 stars 16 forks source link

global: remove port_sptr, maintain ownership at block #257

Closed mormj closed 2 years ago

mormj commented 2 years ago

Prior to this PR, port was maintained as an sptr, but ownership is clearly with the block that has the port.

This changes the ptr type to unique_ptr, and forces a std::move to add_port to the block. This is all done in autogenerated code, so it shouldn't really make an impact to the user.

The only user facing change is that for python blocks, we cannot create a port object, then add it to a block in the constructor. So, the add_port methods are made to mirror the port init methods