70 typedef std::map<std::pair<string, annotation_t>,
120 const bool add_price =
true,
Types for annotating commodities.
Types for managing commodity historys.
boost::posix_time::ptime datetime_t
Encapsulate infinite-precision commoditized amounts.
commodity_t * create(const string &symbol, const annotation_t &details)
commodity_t * find(const string &name)
commodities_map commodities
static shared_ptr< commodity_pool_t > current_pool
commodity_t * default_commodity
std::map< string, shared_ptr< commodity_t > > commodities_map
The commodities collection in commodity_pool_t maintains pointers to all the commodities which have e...
commodity_t * find(const string &symbol, const annotation_t &details)
cost_breakdown_t exchange(const amount_t &amount, const amount_t &cost, const bool is_per_unit=false, const bool add_price=true, const optional< datetime_t > &moment=none, const optional< string > &tag=none)
commodity_t * null_commodity
commodity_t * alias(const string &name, commodity_t &referent)
void exchange(commodity_t &commodity, const amount_t &per_unit_cost, const datetime_t &moment)
function< optional< price_point_t >(commodity_t &commodity, const commodity_t *in_terms_of) get_commodity_quote)
commodity_history_t commodity_price_history
optional< path > price_db
annotated_commodities_map annotated_commodities
commodity_t * find_or_create(commodity_t &comm, const annotation_t &details)
virtual ~commodity_pool_t()
commodity_t * find_or_create(const string &symbol, const annotation_t &details)
commodity_t * create(const string &symbol)
commodity_t * find_or_create(const string &symbol)
std::map< std::pair< string, annotation_t >, shared_ptr< annotated_commodity_t > > annotated_commodities_map
commodity_t * parse_price_expression(const std::string &str, const bool add_prices=true, const optional< datetime_t > &moment=none)
optional< std::pair< commodity_t *, price_point_t > > parse_price_directive(char *line, bool do_not_add_price=false, bool no_date=false)
annotated_commodity_t * create(commodity_t &comm, const annotation_t &details)