diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-09 13:25:45 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-09 13:25:45 -0500 |
commit | 865c0ff828f88ed1d00eea73a3fc55b3e57d21b3 (patch) | |
tree | 5acdfae32811b25fb46271bf349a216bea41fddb /src/commodity.h | |
parent | 55c7792c9329f97dd19fc5aeca466cb2de4fbf9c (diff) | |
parent | 9b396b41220646cf73fcd2a8afebcee06dde2a29 (diff) | |
download | ledger-865c0ff828f88ed1d00eea73a3fc55b3e57d21b3.tar.gz ledger-865c0ff828f88ed1d00eea73a3fc55b3e57d21b3.tar.bz2 ledger-865c0ff828f88ed1d00eea73a3fc55b3e57d21b3.zip |
Merge branch 'next'
Diffstat (limited to 'src/commodity.h')
-rw-r--r-- | src/commodity.h | 23 |
1 files changed, 8 insertions, 15 deletions
diff --git a/src/commodity.h b/src/commodity.h index e2a17638..42cc6d8f 100644 --- a/src/commodity.h +++ b/src/commodity.h @@ -53,11 +53,6 @@ class keep_details_t; DECLARE_EXCEPTION(commodity_error, std::runtime_error); -/** - * @brief Brief - * - * Long. - */ struct price_point_t { datetime_t when; @@ -77,11 +72,6 @@ private: #endif // HAVE_BOOST_SERIALIZATION }; -/** - * @brief Brief - * - * Long. - */ class commodity_t : public delegates_flags<uint_least16_t>, public equality_comparable1<commodity_t, noncopyable> @@ -328,6 +318,11 @@ public: return *base->varied_history; return none; } + optional<const varied_history_t&> varied_history() const { + if (base->varied_history) + return *base->varied_history; + return none; + } optional<history_t&> history(const optional<commodity_t&>& commodity); @@ -424,15 +419,13 @@ inline std::ostream& operator<<(std::ostream& out, const commodity_t& comm) { return out; } -/** - * @brief Brief - * - * Long. - */ struct compare_amount_commodities { bool operator()(const amount_t * left, const amount_t * right) const; }; +void to_xml(std::ostream& out, const commodity_t& comm, + bool commodity_details = false); + } // namespace ledger #endif // _COMMODITY_H |