I have a set of data as input and I my apps should decode it. This data contain different record type and each record type has different way of decoding them,, At the beginning of the data is a frame wrapper which contain the info on what type of record is it .
Now, my question what is the best way to handle this? Here is what i i did. I have a class Frame which handles the decoding of what record type it is then I have a class SpecificFrame that handles decoding of that record type which inherits class Frame. In my app I assign my void* vFrame to a SpecificFrame accordingly . I don't know if am being efficient on this style.
What's your take guys,
baray98
Bookmarks