[zeromq-dev] [Midly OT] Seeking advice on generic message definition for abstract classes
Claudio Carbone
erupter at libero.it
Sun Dec 16 15:01:42 CET 2012
Hello all.
Recently I've been moving from C to C++ and I'd really like to exploit
the capabilities of this language.
One of the scenario I've been thinking about is a ZMQ generic class able
to do all the work.
Generally speaking abstracting from the socket and context creation is
easy: you just need to tell the constructor what kind of socket you
want, and where you want it.
What would be much more useful and powerful (and complex) would be to
design a way to pass message syntax in an abstract form, so you can add
as many messages you want to the class.
That way a sender subclass would create as many sending hooks as message
types, while a receiver class would create as many callbacks as message
types.
I think this would be a nice design, thus I'm asking here for advices
and ideas about such an implementation.
Thank you
Claudio
More information about the zeromq-dev
mailing list