Re: [Quickfix-developers] Using UNICODE with the QuickFix C++ Library
Brought to you by:
orenmnero
From: <OM...@th...> - 2002-11-25 08:06:21
|
Constantin, As far as CPU time, I'm not sure such a thing would help you. FIX is an ASCII standard for the most part. The exception being the Encoded fields which can be transmitted with different character sets. At one point or another, these strings would need to be converted before being sent across the wire. If you still want QuickFIX to accept wstrings for ease of use, you should be able to do the following. In FieldTypes.h, change all the "typedef std::string <SOMETHING>" lines to read, "typedef std::wstring <SOMETHING>" In FieldConvertors.h, replace the line "typedef EmptyConvertor StringConvertor" with a class that will convert between strings and wstrings (see the other convertors in the file for how to do this) Finally, in Field.h, change all references in the StringField class from std::string to std::wstring. Use your new convertor where appropriate (see other field types for examples). I think that is all the steps. Alternatively, I usually like to have a small inline method I can use to conveniently do such conversions in a manner such as this: ClOrdID clOrdID(w2a(L"MY STRING")); --oren |---------+-----------------------------------------------> | | "Stancescu Constantin" | | | <Con...@sw...> | | | Sent by: | | | qui...@li...ur| | | ceforge.net | | | | | | | | | 11/23/2002 09:20 AM | | | | |---------+-----------------------------------------------> >----------------------------------------------------------------------------------------------| | | | To: <qui...@li...> | | cc: "Stancescu Constantin" <Con...@sw...> | | Subject: [Quickfix-developers] Using UNICODE with the QuickFix C++ Library | >----------------------------------------------------------------------------------------------| Hi, I integrated QuickFix C++ as apart of a COM+ object in the context of Windows 2000; all the rest of data in my application is BSTR and UNICODE. I spend a lot of (CPU)time and lines of code converting between std::string and WCHAR; I saw that the .NET library implementation uses wstring, any idea to have the same with the C++ Windows library ? Regards, Constantin PS I also need some encryption(and even compression for some very big XmlData diels), does anyone have a hack to support opaque data type ? This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. The sender's company reserves the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers |