On Sat, Mar 29, 2008 at 3:58 PM, Steven Watanabe <watanabesj@gmail.com> wrote:
AMDG
You should be able to switch between using RTTI and using ID's in the
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.
dispatcher with
a few lines of code. *Measure the difference* before making decisions
for performance
considerations.
Of course, if you need the ID's around anyway for other reasons, they are
> 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.
not a problem. I wouldn't expend Herculean efforts to eliminate them.
struct WalkPacket : CRTPPacket<WalkPacket, PID_WALKPACKET> {}; ?
> 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).