24#ifndef quantlib_composite_instrument_hpp
25#define quantlib_composite_instrument_hpp
46 typedef std::list<component>::iterator
iterator;
50 void add(
const ext::shared_ptr<Instrument>& instrument,
51 Real multiplier = 1.0);
53 void subtract(
const ext::shared_ptr<Instrument>& instrument,
54 Real multiplier = 1.0);
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 >::iterator iterator
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_
Abstract instrument class.
Abstract instrument class.