Logo Search packages:      
Sourcecode: quantlib version File versions  Download package

void QuantLib::Instrument::fetchResults ( const PricingEngine::results r ) const [inline, virtual, inherited]

When a derived result structure is defined for an instrument, this method should be overridden to read from it. This is mandatory in case a pricing engine is used.

Reimplemented in QuantLib::EnergyCommodity, QuantLib::CdsOption, QuantLib::SyntheticCDO, QuantLib::AssetSwap, QuantLib::Bond, QuantLib::CreditDefaultSwap, QuantLib::EverestOption, QuantLib::ForwardVanillaOption, QuantLib::MultiAssetOption, QuantLib::OneAssetOption, QuantLib::QuantoBarrierOption, QuantLib::QuantoForwardVanillaOption, QuantLib::QuantoVanillaOption, QuantLib::Swap, QuantLib::VanillaSwap, QuantLib::VarianceSwap, QuantLib::YearOnYearInflationSwap, and QuantLib::ZeroCouponInflationSwap.

Definition at line 172 of file instrument.hpp.

References QL_ENSURE.

Referenced by QuantLib::Instrument::performCalculations().

                                                                           {
        const Instrument::results* results =
            dynamic_cast<const Instrument::results*>(r);
        QL_ENSURE(results != 0,
                  "no results returned from pricing engine");

        NPV_ = results->value;
        errorEstimate_ = results->errorEstimate;
        valuationDate_ = results->valuationDate;

        additionalResults_ = results->additionalResults;
    }

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index