58 unique_ptr<commodity_history_impl_t> p_impl;
78 boost::optional<price_point_t>
83 boost::optional<price_point_t>
Basic type for handling commoditized math: amount_t.
Types for handling commodities.
std::map< datetime_t, amount_t > price_map_t
boost::posix_time::ptime datetime_t
Encapsulate infinite-precision commoditized amounts.
void add_commodity(commodity_t &comm)
void remove_price(const commodity_t &source, const commodity_t &target, const datetime_t &date)
void print_map(std::ostream &out, const datetime_t &moment=datetime_t())
void add_price(const commodity_t &source, const datetime_t &when, const amount_t &price)
boost::optional< price_point_t > find_price(const commodity_t &source, const commodity_t &target, const datetime_t &moment, const datetime_t &oldest=datetime_t())
void map_prices(function< void(datetime_t, const amount_t &)> fn, const commodity_t &source, const datetime_t &moment, const datetime_t &_oldest=datetime_t(), bool bidirectionally=false)
boost::optional< price_point_t > find_price(const commodity_t &source, const datetime_t &moment, const datetime_t &oldest=datetime_t())