Hi Rohan,
> Can we use a .Xml file instead of .cfg file , while sending an file name as argument to
> sessionsettings class.
The SessionSettings class expects either an input stream or a filename as string:
SessionSettings (std::istream &stream) throw ( ConfigError )
SessionSettings (const std::string &file) throw ( ConfigError )
If you want to use an XML file, you have to parse it yourself and convert it into the
QuickFIX configuration format, e.g. as string and use an istream which reads from a string
as an argument to the SessionSettings class. Since I am not a C++ or C# programmer, I do
not know the exact code; for Java this would be:
String configuration = "[DEFAULT]\nConnectionType=initator\n...";
InputStream configStream = new ByteArrayInputStream( configuration.getBytes() );
Settings settings = new Settings(configStream);
Then it is up to you to fill the configuration string with data. E.g. we configure
QuickFIX with Java properties and wrote a convertor from properties to the QF config file
format.
At the moment, there is no XML format of the config file planned: There is no extra
benefit of using XML. Instead QuickFIX should be kept as simple as possible. Oren, please
tell me if you changed your mind.
Cheers, Jörg
--
Joerg Thoennes
http://macd.com
Tel.: +49 (0)241 44597-24 Macdonald Associates GmbH
Fax : +49 (0)241 44597-10 Lothringer Str. 52, D-52070 Aachen
|