From 690e46117e1da8da1dd1bd2b9a0151c2b792104e Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 2 Nov 2009 21:39:54 -0500 Subject: Added Python interface for commodity_t --- src/commodity.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/commodity.h') diff --git a/src/commodity.h b/src/commodity.h index d30a0847..f65df1b9 100644 --- a/src/commodity.h +++ b/src/commodity.h @@ -245,30 +245,31 @@ public: operator bool() const; - static bool symbol_needs_quotes(const string& symbol); - - bool is_annotated() const { - return annotated; - } - virtual bool operator==(const commodity_t& comm) const { if (comm.annotated) return comm == *this; return base.get() == comm.base.get(); } + static bool symbol_needs_quotes(const string& symbol); + virtual commodity_t& referent() { return *this; } virtual const commodity_t& referent() const { return *this; } + + bool is_annotated() const { + return annotated; + } + virtual commodity_t& strip_annotations(const keep_details_t&) { return *this; } virtual void write_annotations(std::ostream&) const {} - commodity_pool_t& parent() const { + commodity_pool_t& pool() const { return *parent_; } @@ -329,7 +330,6 @@ public: optional history(const optional& commodity); -public: // These methods provide a transparent pass-through to the underlying // base->varied_history object. -- cgit v1.2.3