diff options
Diffstat (limited to 'src/commodity.h')
-rw-r--r-- | src/commodity.h | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/src/commodity.h b/src/commodity.h index d2c778c2..93b5bf1d 100644 --- a/src/commodity.h +++ b/src/commodity.h @@ -391,11 +391,8 @@ struct annotation_t : public equality_comparable<annotation_t> } void parse(std::istream& in); - void print(std::ostream& out) const { - out << "price " << (price ? price->to_string() : "NONE") << " " - << "date " << (date ? *date : date_t()) << " " - << "tag " << (tag ? *tag : "NONE"); - } + + void print(std::ostream& out, bool keep_base = false) const; bool valid() const { assert(*this); @@ -486,13 +483,7 @@ public: } virtual commodity_t& strip_annotations(const keep_details_t& what_to_keep); - - virtual void write_annotations(std::ostream& out) const { - annotated_commodity_t::write_annotations(out, details); - } - - static void write_annotations(std::ostream& out, - const annotation_t& info); + virtual void write_annotations(std::ostream& out) const; }; inline annotated_commodity_t& @@ -535,6 +526,8 @@ public: commodity_t * null_commodity; commodity_t * default_commodity; + bool keep_base; + public: boost::function<optional<amount_t> (commodity_t& commodity, |