Dear Peter,
My replies in bold
Take a look at the new base class Protocols::Generics::Packet and e.g. the base class for BitTorrent packets Protocols::BitTorrent::Packets::Packet.
I think I should start using bzr
In a nutshell the private data class of the derived class Packet class should derive from the private data class of the base class. The ctors of the derived class create a private object of the correct (derived) private data class and pass the pointer to the base ctor. The macros Q_DECLARE_SHARED_DATA and QS_D facilitate the use of the pointer to the private data from the base class by casting it to the private data of the derived class.Yes I was thinging along the same linesĀ ;-)
— cheerio atul
atul wrote:reference counting Packet base class ( as there could be no object as it is not concrete )and reference counting the concrete packets ( like pong ? )
I was wondering why to maintain Packet::Data::ref and Pong::Data::ref separately ( Packet::Data::ref could suffice maybe ? )
— cheerio atul
