Skip to content

Add seal for s4u_host, but before refactor

Bruno Donassolo requested to merge bruno.donassolo/simgrid:s4u_host_seal into master

My idea was adding the seal() for s4u_Host so we can create the pimpl and surf resources at it. But before some cleanups in Host/VM. I still not 100% sure about s4u_vm extending s4u_host, but have nothing to propose.

Main changes:

  • pimpl_ pointers private and unique
  • VMImpl implements a VM "interface", HostImpl a host interface. Remove inheritance between implementations.
  • add seal for s4u_Host: where the impl is created, a step forward to have new()->set->seal() idiom
  • simplify HostImpl constructor: no need for destroying other implementations in it. Also, avoid indirection setting of variable. S4u_Host creates the HostImpl but it's the HostImpl constructor that sets the s4u_Host.pimpl variable.

Merge request reports