I suppose this is an unusual use case. But I've run into it a few times now.
Is it possible to force all inherited classes to have public static variables that are defined in the child class?
Aka:
APacket.ID = 0; // Abstract parent class, has static ID variable (0)
PacketPos.ID = 1; // Inherits from APacket, has static ID variable (1)
PacketVel.ID = 2; // Inherits from APacket, has static ID variable (2)
I want all my network packet classes to have unique and public static ID and Length variables.
Is something like this possible?