Re: [Quickfix-developers] Question about customized group
Brought to you by:
orenmnero
|
From: Djalma R. d. S. F. <drs...@gm...> - 2007-06-08 21:19:42
|
Hi,
There is no xsl for NewOrderSingle, the heavy job is made by ruby scripts.
IMHO, it should work for your case too. I can't see a reason why not.
Anyway, you can change the NewOrderSingle.h yourself, but the scripts exist
to automate this process.
Another solution I used to adopt in the past, when I did not know how to use
the scripts, required some more coding to create the group and add it to the
FIX::Message, like example bellow:
// Declare a group like the following:
class NoBTSClients : public FIX::Group
{
public:
NoBTSClients() : FIX::Group(BTS::FIELD::NoBTSClients,
BTS::FIELD::BTSClient,
FIX::message_order(BTS::FIELD::BTSClient,
FIX::FIELD::BeginString, BTS::FIELD::BTSClientStatus, 0))
{}
};
// use it in a FIX::Message
FIX::Message statusResponse;
NoBTSClients aClientStatus;
aClientStatus.setField(BTS::FIELD::BTSClient,
curIter->getTargetCompID().getValue() );
aClientStatus.setField(FIX::FIELD::BeginString,
curIter->getBeginString().getValue() );
std::stringstream textstream;
textstream << iStatus;
aClientStatus.setField(BTS::FIELD::BTSClientStatus, textstream.str());
statusResponse.addGroup(aClientStatus);
But, if you want the most elegant solution... maybe if you submit your
modified FIX42.xml, maybe I can help you with the scripts results.
Djalma
On 6/8/07, quickfixuser <fw...@ro...> wrote:
>
> QuickFIX Documentation:
> http://www.quickfixengine.org/quickfix/doc/html/index.html
> QuickFIX Support: http://www.quickfixengine.org/services.html
>
>
>
> Thanks Djalma. Your post is very interesting. It seems quickfix is very
> nicely designed. However, though I believe this will work for simple
> cases,
> it seems not work for groups very well. My first problem is that the codes
> will stop compiling after I run the script against my modified fix42.xml.
> I
> realized there are duplicate fields generated in some header files though
> I
> have no duplicate fields in xml. Second, the script only run several
> shared
> source file, for a specific class as NewOrderSingle in fix42, I have no
> xsl
> to run aginst. Since the group part need to be part the NewOrderSingle
> codes
> to let it properly added (by addGroup), I still have to manually add it
> anyway (please let me know if I misunderstand this part).
>
> I am not familiar with msxml, and maybe I did soemthing wrong, but it
> seems
> to me not work on my case and I finally still have to modify the quickfix
> codes directly for this purpose.
>
>
>
>
> Hi,
>
> If you want to use a customized vesion of FIX42::NewOrderSingle, see my
> post
> about regenerating quickfix classes after changing xml files. This is the
> easiest way in my opinion.
>
>
> http://www.nabble.com/Rgenerating-code-after-changing-xml-files-in-spec-fix44-directory-tf3190167.html#a8855920
>
> Basically, you need to change the definition of NewOrderSingle in
> FIX42.xmland use spec\generate.bat or spec\generate.sh and recompile
> quickfix (if you
> are using only C++ I think that this step is not required).
>
> In order to make the script execution faster, comment out the java / .Net
> code generation and also FIX versions you don't use in Generator.rb and
> run
> "ruby Generator.rb" or generate.bat, if you are using Windows. It will
> take
> some minutes to generate all the .h files for you.
>
> Djalma
>
> On 6/6/07, quickfixuser <fw...@ro...> wrote:
> >
> > QuickFIX Documentation:
> > http://www.quickfixengine.org/quickfix/doc/html/index.html
> > QuickFIX Support: http://www.quickfixengine.org/services.html
> >
> >
> > Hi,
> > I have to add a repeating group (NoLegs) to NewOrderSingle message for
> > fix42. It seems I have to change QuickFix codes to do it (please correct
> > me
> > if I am wrong). One question about Group Caass.
> >
> > For this constructor, can someone tell me what the m_delim is for? I do
> > not
> > see any use of it and get confused when I have to add a modified NoLegs
> > class for fix42 message.
> >
> > thanks
> >
> > Group( int field, int delim, const message_order& order )
> > : FieldMap( order ), m_field( field ), m_delim( delim ) {}
> >
> > NoLegs() :
> >
> >
> FIX::Group(555,600,FIX::message_order(600,602,609,610,624,612,613,623,654,565,0))
> > {}
> >
> > --
> > View this message in context:
> >
> http://www.nabble.com/Question-about-customized-group-tf3879024.html#a10992496
> > Sent from the QuickFIX - Dev mailing list archive at Nabble.com.
> >
> >
> >
> -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > _______________________________________________
> > Quickfix-developers mailing list
> > Qui...@li...
> > https://lists.sourceforge.net/lists/listinfo/quickfix-developers
> >
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Quickfix-developers mailing list
> Qui...@li...
> https://lists.sourceforge.net/lists/listinfo/quickfix-developers
>
>
> --
> View this message in context:
> http://www.nabble.com/Question-about-customized-group-tf3879024.html#a11026398
> Sent from the QuickFIX - Dev mailing list archive at Nabble.com.
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Quickfix-developers mailing list
> Qui...@li...
> https://lists.sourceforge.net/lists/listinfo/quickfix-developers
>
|