Skip to content

GenSync._PostProcessing is needlessly convoluted #79

@novakboskov

Description

@novakboskov

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.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions