jeudi 11 janvier 2018

Using interface for writing save data to a file

So it's like I have stumbled across a design related problem and can't sort it out which is as follows... I have Two Classes which use different structs for storing and processing their data in memory. There is another class for storing data basically on a file named File_Data_Handler which itself implements an Interface IDController for reading ,writing ,searching , deletion operation on the file. Now the point where I am facing real problem is how to establish an elegant channel for communication between the interface and the classes for writing data based on different structs while keeping the code related to data writing mechanics in File_Data_Handler same. Any help will be appreciated thanks in advance.

Aucun commentaire:

Enregistrer un commentaire