|
From: Bojan N. <bo...@bn...> - 2011-04-28 13:44:54
|
Hi Alan,
"Fischbein, Alan: C12 (NYK)" <Ala...@C1...> writes:
> Does this mean that even my unmanaged classes cannot reference non-CLR
> supported types in their definition? (as opposed to implementation.)
> Thanks.
I think in standard C++ parlance you mean "in declaration as opposed to
definition".
The answer (I think) is that you can use non-CLR compatible types only
by having them as incomplete types in your unmanaged class declaration
(i.e., the part that is in the ".h" file). In other words, you forward
declare the non-CLR compatible QuantLib types you wish to use in your
NativeInterestCurve. For example, you can do
class YieldTermStructure;
class NativeInterestCurve
{
boost::scoped_ptr<YieldTermStructure> TermStructure_;
};
But note that you can not use boost::shared_ptr there as that requires a
complete type.
Best,
Bojan
--
Bojan Nikolic || http://www.bnikolic.co.uk
|