|
From: Bill S. <we...@os...> - 2000-01-24 14:20:58
|
On Mon, 24 Jan 2000, Denis V. Dmitrienko wrote: > Vadim Zaliva <lo...@cr...> writes: > > > Hi! > > By they way, as part of my other projec, I am finishing now tiny C++ > > wrapper around ICQLIB. Once it will be ready (within a week) I will send > > you description. Maybe we can provide it as optional part of ICQLIB. > > And what is the best way: leave icqlib implemented with plain C and add C++ > wrapper to it or switch icqlib to the C++ language? What are all of you > guys thinking? I know from my work on the tcp section of the lib I think it's _very_ clear that they implemented the real ICQ protocol in C++, almost all of my tcp code is very OO-like. Especially by the way the tcp hello and tcp packets work- the more specialized packets are simply copies of existing packets with extra information tacked on the end, indicating to me in the real ICQ they probably used inheritance, etc. I think it would be a good change, but I also don't know anything about portability so I can't comment. We'd really need to use STL I think- but is this portable now? It seems most C++ implementations have at least a basic STL now, and we could always try to stick to the simple types (especially since that's all we really need anyway) like lists and queues. I also think it would _significanly_ clean up the library interface. ex: ICQ::Contact denis( DENIS_ICQ_NUMBER ); ICQ::Link *link = new ICQ::Link; link->contactList.add( denis ); link->setStatus( ICQ::Online ); ICQ::Message message( "C++ icqlib!" ); link.sendEvent( message ); delete link; Either way we're going to need to make an interface change soon I think. So I say go for it, as long as it maintains portability (if that's still one of your design goals Denis). Bill |