From a9bdcc33013b5e1e76571ee1104bd8c7f278e775 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 20 May 2012 15:03:22 -0500 Subject: Work around collision between Format's put & Graph --- src/history.h | 48 ++++-------------------------------------------- 1 file changed, 4 insertions(+), 44 deletions(-) (limited to 'src/history.h') diff --git a/src/history.h b/src/history.h index af0d90f9..4362c9f9 100644 --- a/src/history.h +++ b/src/history.h @@ -49,57 +49,17 @@ #include "amount.h" #include "commodity.h" -namespace boost { - enum edge_price_point_t { edge_price_point }; - enum edge_price_ratio_t { edge_price_ratio }; - BOOST_INSTALL_PROPERTY(edge, price_point); - BOOST_INSTALL_PROPERTY(edge, price_ratio); -} - namespace ledger { typedef std::map price_map_t; +class commodity_history_impl_t; class commodity_history_t : public noncopyable { -public: - typedef adjacency_list - >, - - // All edges are weights computed as the absolute difference between - // the reference time of a search and a known price point. A - // filtered_graph is used to select the recent price point to the - // reference time before performing the search. - property > >, - - // Graph itself has a std::string name - property - > Graph; + unique_ptr p_impl; - Graph price_graph; - - typedef graph_traits::vertex_descriptor vertex_descriptor; - typedef graph_traits::edge_descriptor edge_descriptor; - - typedef property_map::type NameMap; - typedef property_map::type EdgeWeightMap; - typedef property_map::type PricePointMap; - typedef property_map::type PriceRatioMap; - - PricePointMap pricemap; - PriceRatioMap ratiomap; - - commodity_history_t() - : pricemap(get(edge_price_point, price_graph)), - ratiomap(get(edge_price_ratio, price_graph)) {} +public: + commodity_history_t(); void add_commodity(commodity_t& comm); -- cgit v1.2.3