GenSync._PostProcessing is a private pointer to the function that takes a pointer to the GenSync object and pointers toGenSync::add(...) and GenSync::del(...). It's hard for me to reason about the scenario in which there is no simpler way to achieve the same.
All that GenSync._PostProcessing does is filling GenSync::myData with otherMinusSelf once the GenSync::serverSyncBegin or GenSync::clientSyncBegin is done.
What about simply having a virtual SyncMethod::postProcessing(GenSync&) and simple private members SyncMethod::otherMinusSelf and SyncMethod::selfMinusOther? Then GenSync::...SyncBegin can call myMeth.postProcessing(this) and each SyncMethod is free to implement its own version of post processing.
Additionally, seems like GenSync::myData and private SyncMethod::elements are basically the very same thing and SyncMethod::elements is used only in IBLTSetOfSets. If IBLTSetOfSets needs "elements", that needs to be in IBLTSetOfSet class itself.
GenSync._PostProcessing
is a private pointer to the function that takes a pointer to theGenSync
object and pointers toGenSync::add(...)
andGenSync::del(...)
. It's hard for me to reason about the scenario in which there is no simpler way to achieve the same.All that
GenSync._PostProcessing
does is fillingGenSync::myData
withotherMinusSelf
once theGenSync::serverSyncBegin
orGenSync::clientSyncBegin
is done.What about simply having a
virtual SyncMethod::postProcessing(GenSync&)
and simple private membersSyncMethod::otherMinusSelf
andSyncMethod::selfMinusOther
? ThenGenSync::...SyncBegin
can callmyMeth.postProcessing(this)
and eachSyncMethod
is free to implement its own version of post processing.Additionally, seems like
GenSync::myData
andprivate SyncMethod::elements
are basically the very same thing andSyncMethod::elements
is used only inIBLTSetOfSets
. IfIBLTSetOfSets
needs "elements", that needs to be inIBLTSetOfSet
class itself.