I'm trying to extend the QuickFix engine so it can support the FIXML format.
I've think in two solution, directly edit the C++ classes and recompile the
libraries or inherited from them and redefine the methods. But when a start
reading the C++ code I found some strange things, like for example:
bool Session::sendToTarget( Message* message )
{ QF_STACK_TRY
try
{
Message __pin * pMessage = message;
return FIX::Session::sendToTarget( pMessage->unmanaged() );
}
catch ( FIX::SessionNotFound& ) { throw new SessionNotFound(); };
QF_STACK_CATCH
}
This might one of the methods I'll have to redefine, but I still don't get
it. It is calling itself recursively. How can the message be send in this
terms...??? I look up for the message class to see what does the unmanaged()
method do....
FIX::Message& unmanaged()
{ return * m_pUnmanaged; }
Just return an attribute... so... let see where is that attribute is set...
Message() : disposed( false )
{ QF_STACK_TRY
m_pUnmanaged = new FIX::Message();
m_header = new Header( this );
m_trailer = new Trailer( this );
QF_STACK_CATCH
}
This finish to confused me.... the method is call recursively allocating
memory for a new Message..... What!!!!!! Obviously I'm quite rusty with C++.
Please help!!!!
Greetings, Julian.
|