Re: Packets as Value Objects

And what about renaming the abstract base class to PacketBase (from it the concrete protocols should derive their base packet) and simply naming the value proxy Packet? And we’d better make the object() function a function template returning a (dynamicly) casted reference, so that we could for example write packet.cast_to ().field(); thoug the empty parent look wierd…

I’ll give it a try!

Regards,
Peter

Would you like to post a relpy?


This post is a reply to:
Packets as Value Objects
Dear all, I'm thinking about making the base class Packet a value object. In tests it would be much easier to compare value objects (CalitkoMocks makes this automatically) instead of pointers (more...)

No follow-ups yet.