29 Mar
2008
29 Mar
'08
5:08 p.m.
AMDG Robert Dailey wrote:
You could put the ID in the base Packet type. That should minimize the chances of mismatch.
Right now I'm already putting the ID as a static constant variable in each derived type. I don't see a way to set the ID in the base Packet class, since that would more than likely require CRTP or something. From what I have seen the Packet base class cannot be a template. I suppose you could do this if you used 3 levels of inheritance, but that seems ugly.
I'm thinking of a non static member variable in the base class, which can be set in the constructor. In Christ, Steven Watanabe