Re: Any soultions to this old thread of calling quantlib from managed code?

Posted by Nathan Abbott on
URL: http://quantlib.414.s1.nabble.com/Any-soultions-to-this-old-thread-of-calling-quantlib-from-managed-code-tp8168p8171.html

By the way do you think if there is any issues if I
wrap #pragma managed(push, off) and #pragma managed(pop) around the
definition of singleton template (i.e. in singleton.hpp


That is a good question. I have to think about.  If you do it, I think that you should also do it for all the classes that inherits from Singleton. In fact, I think you should do it for all class that are defined only in header files especially the classes that also has any static variables. An example of this is the currencies classes.  I had to write wrapper functions for them also.

for example

#pragma managed(push, off)
QuantLib::Currency CreateUSDCurrency()
{
    return QuantLib::USDCurrency();
}
#pragma managed(pop)


#pragma managed(push, off)
QuantLib::Currency CreateEURCurrency()
{
    return QuantLib::EURCurrency();
}
#pragma managed(pop)






------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users