Hi All, Thanks everyone for looking at and testing the latest C++ client update. Sorry if we have not been so clear regarding the stability of the code, the code is highly untested and as said in the upload mail we will commence testing/debugging shortly - so expect bugs!!
As we've just finished the port we will shift focus and look into all the issues you have raised, see comments below. 1) Use of smart pointers. Though the user interface would be cleaner without smart pointers they serves a purpose even when the passed in object is not owned by the client. As soon as an object is shared between two classes you have the problem when the object should be deleted - this problem is eliminated when using SP's, the object is deleted when both object releases its reference to it. SP's and Strings: Semi-agreed :) The setters should all have "const char*" but we could change the getters to std:string (without SP), then it is up to the user to either use it as a std:string or a "const char*". 2) ITextMessage should extend IMessage This was a last minute change to make it compile. Nate, your solution seems to be a viable way of handling it - thanks! 3) SP dynamic_cast rather than reinterpret_cast It is correct that reinterpret_cast<> does not adjust the pointer value as needed when casting between different classes in a class hierarchy. However, the reinterpret_cast<> is used for casting between void* and objects and is needed for the p<> template to work. Where such pointer-value-adjustment is needed (up/down-casting), static_cast<> is used which works the same as dynamic_cast<> except that it does no runtime type check. 4) ExceptionListener An ExceptionListener is missing. We could either add a method on IMessageListener or add a new interface IExceptionListener, prefer the latter. Ok? 5) .NET namespace Hiram, what rules does Apache imply on this? Is it ok to use the namespaces your giving examples on? Looking on the Java code all Apache code starts with org.apache. Regards, Mats & David