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._PostProcessingis a private pointer to the function that takes a pointer to theGenSyncobject 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._PostProcessingdoes is fillingGenSync::myDatawithotherMinusSelfonce theGenSync::serverSyncBeginorGenSync::clientSyncBeginis done.What about simply having a
virtual SyncMethod::postProcessing(GenSync&)and simple private membersSyncMethod::otherMinusSelfandSyncMethod::selfMinusOther? ThenGenSync::...SyncBegincan callmyMeth.postProcessing(this)and eachSyncMethodis free to implement its own version of post processing.Additionally, seems like
GenSync::myDataandprivate SyncMethod::elementsare basically the very same thing andSyncMethod::elementsis used only inIBLTSetOfSets. IfIBLTSetOfSetsneeds "elements", that needs to be inIBLTSetOfSetclass itself.