summaryrefslogtreecommitdiff
path: root/src/commodity.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/commodity.h')
-rw-r--r--src/commodity.h23
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