diff options
author | John Wiegley <johnw@newartisans.com> | 2009-11-02 21:39:54 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-11-02 21:55:53 -0500 |
commit | 690e46117e1da8da1dd1bd2b9a0151c2b792104e (patch) | |
tree | 68aadb45413dfe4319d0b4d0a79985900fbc7c01 /src/commodity.h | |
parent | 4befcfa27d1e4b162512f6161f9f897862ccdf57 (diff) | |
download | fork-ledger-690e46117e1da8da1dd1bd2b9a0151c2b792104e.tar.gz fork-ledger-690e46117e1da8da1dd1bd2b9a0151c2b792104e.tar.bz2 fork-ledger-690e46117e1da8da1dd1bd2b9a0151c2b792104e.zip |
Added Python interface for commodity_t
Diffstat (limited to 'src/commodity.h')
-rw-r--r-- | src/commodity.h | 16 |
1 files changed, 8 insertions, 8 deletions
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_t&> history(const optional<commodity_t&>& commodity); -public: // These methods provide a transparent pass-through to the underlying // base->varied_history object. |