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

void QuantLib::EnergyCommodity::fetchResults ( const PricingEngine::results *  r  )  const [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 from QuantLib::Instrument.

Definition at line 81 of file energycommodity.cpp.

References QuantLib::Instrument::fetchResults(), and QL_REQUIRE.

                                                                          {
        Instrument::fetchResults(r);
        const EnergyCommodity::results* results =
            dynamic_cast<const EnergyCommodity::results*>(r);
        QL_REQUIRE(results != 0, "wrong result type");
    }


Generated by  Doxygen 1.6.0   Back to index