
On Sat, Mar 29, 2008 at 3:58 PM, Steven Watanabe
AMDG
Robert Dailey wrote:
Well I'm not 100% sure of the performance impact RTTI will have on the application. What I've read is that RTTI can get very expensive in terms of executable size if you have a lot of classes in your application.
You should be able to switch between using RTTI and using ID's in the dispatcher with a few lines of code. *Measure the difference* before making decisions for performance considerations.
Unfortunately I don't think I could get away with using strings since the network is assigning integral values to the packets in order to uniquely identify them. Of course, if you need the ID's around anyway for other reasons, they are not a problem. I wouldn't expend Herculean efforts to eliminate them.
I like the string idea because it doesn't have the repetitive code in each derived class (the overridden GetID method that will be the same in each derived class).
struct WalkPacket : CRTPPacket
{}; ?
What exactly is this structure supposed to present?