25 QL_REQUIRE(instrument,
"null instrument provided");
37 instrument->alwaysForwardNotifications();
41 const ext::shared_ptr<Instrument>& instrument,
Real multiplier) {
42 add(instrument, -multiplier);
62 i->first->deepUpdate();
std::pair< ext::shared_ptr< Instrument >, Real > component
void performCalculations() const override
void add(const ext::shared_ptr< Instrument > &instrument, Real multiplier=1.0)
adds an instrument to the composite
bool isExpired() const override
returns whether the instrument might have value greater than zero.
std::list< component >::const_iterator const_iterator
void deepUpdate() override
void subtract(const ext::shared_ptr< Instrument > &instrument, Real multiplier=1.0)
shorts an instrument from the composite
std::list< component > components_
std::pair< iterator, bool > registerWith(const ext::shared_ptr< Observable > &)
Composite instrument class.
#define QL_REQUIRE(condition, message)
throw an error if the given pre-condition is not verified