diff options
author | John Wiegley <johnw@newartisans.com> | 2012-03-04 04:03:32 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-03-05 05:03:52 -0600 |
commit | e9108783122ae4d775046ced646b14552f1e184d (patch) | |
tree | 4dd6699b86f65f17c93d5d465589fc344c8990fc /src/commodity.h | |
parent | 48ab6ad1dbab100bb8abd87029a0ca5bc501a3db (diff) | |
download | fork-ledger-e9108783122ae4d775046ced646b14552f1e184d.tar.gz fork-ledger-e9108783122ae4d775046ced646b14552f1e184d.tar.bz2 fork-ledger-e9108783122ae4d775046ced646b14552f1e184d.zip |
Changes to get all the code to compile
Diffstat (limited to 'src/commodity.h')
-rw-r--r-- | src/commodity.h | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/commodity.h b/src/commodity.h index 1505fe24..a1ad0147 100644 --- a/src/commodity.h +++ b/src/commodity.h @@ -106,12 +106,13 @@ protected: #define COMMODITY_SAW_ANN_PRICE_FLOAT 0x400 #define COMMODITY_SAW_ANN_PRICE_FIXATED 0x800 - string symbol; - amount_t::precision_t precision; - optional<string> name; - optional<string> note; - optional<amount_t> smaller; - optional<amount_t> larger; + string symbol; + optional<std::size_t> graph_index; + amount_t::precision_t precision; + optional<string> name; + optional<string> note; + optional<amount_t> smaller; + optional<amount_t> larger; typedef std::pair<optional<datetime_t>, optional<datetime_t> > optional_time_pair_t; @@ -123,15 +124,13 @@ protected: static const std::size_t max_price_map_size = 16; mutable memoized_price_map price_map; - mutable bool searched; - public: explicit base_t(const string& _symbol) : supports_flags<uint_least16_t> (commodity_t::decimal_comma_by_default ? static_cast<uint_least16_t>(COMMODITY_STYLE_DECIMAL_COMMA) : static_cast<uint_least16_t>(COMMODITY_STYLE_DEFAULTS)), - symbol(_symbol), precision(0), searched(false) { + symbol(_symbol), precision(0) { TRACE_CTOR(base_t, "const string&"); } virtual ~base_t() { @@ -226,6 +225,13 @@ public: return base_symbol(); } + optional<std::size_t> graph_index() const {; + return base->graph_index; + } + void set_graph_index(const optional<std::size_t>& arg = none) { + base->graph_index = arg; + } + optional<string> name() const { return base->name; } |