53 public equality_comparable<annotation_t>
55#define ANNOTATION_PRICE_CALCULATED 0x01
56#define ANNOTATION_PRICE_FIXATED 0x02
57#define ANNOTATION_PRICE_NOT_PER_UNIT 0x04
58#define ANNOTATION_DATE_CALCULATED 0x08
59#define ANNOTATION_TAG_CALCULATED 0x10
60#define ANNOTATION_VALUE_EXPR_CALCULATED 0x20
68 const optional<date_t>& _date = none,
69 const optional<string>& _tag = none,
70 const optional<expr_t>& _value_expr = none)
71 : supports_flags<>(),
price(_price),
date(_date),
tag(_tag),
74 "optional<amount_t> + date_t + string + expr_t");
77 : supports_flags<>(other.
flags()),
87 operator bool()
const {
102 void print(std::ostream& out,
bool keep_base =
false,
103 bool no_computed_annotations =
false)
const;
121 bool _keep_date =
false,
122 bool _keep_tag =
false,
123 bool _only_actuals =
false)
159 public equality_comparable<annotated_commodity_t,
160 equality_comparable2<annotated_commodity_t, commodity_t,
185 return *
this ==
static_cast<const commodity_t&
>(comm);
201 optional<price_point_t>
208 virtual void print(std::ostream& out,
bool elide_quotes =
false,
209 bool print_annotations =
false)
const {
210 if (print_annotations) {
211 std::ostringstream buf;
221 bool no_computed_annotations =
false)
const;
228inline const annotated_commodity_t&
#define TRACE_CTOR(cls, args)
annotated_commodity_t & as_annotated_commodity(commodity_t &commodity)
void put_annotation(property_tree::ptree &pt, const annotation_t &details)
std::ostream & operator<<(std::ostream &out, const account_t &account)
boost::posix_time::ptime datetime_t
optional< amount_t > price
bool operator==(const annotation_t &rhs) const
void parse(std::istream &in)
optional< expr_t > value_expr
void print(std::ostream &out, bool keep_base=false, bool no_computed_annotations=false) const
bool operator<(const annotation_t &rhs) const
annotation_t(const optional< amount_t > &_price=none, const optional< date_t > &_date=none, const optional< string > &_tag=none, const optional< expr_t > &_value_expr=none)
annotation_t(const annotation_t &other)
bool keep_all(const commodity_t &comm) const
keep_details_t(bool _keep_price=false, bool _keep_date=false, bool _keep_tag=false, bool _only_actuals=false)
keep_details_t(const keep_details_t &other)
bool keep_any(const commodity_t &comm) const
virtual optional< price_point_t > find_price(const commodity_t *commodity=NULL, const datetime_t &moment=datetime_t(), const datetime_t &oldest=datetime_t()) const
virtual ~annotated_commodity_t()
virtual void print(std::ostream &out, bool elide_quotes=false, bool print_annotations=false) const
virtual bool operator==(const annotated_commodity_t &comm) const
virtual void write_annotations(std::ostream &out, bool no_computed_annotations=false) const
annotated_commodity_t(commodity_t *_ptr, const annotation_t &_details)
virtual commodity_t & referent()
virtual bool operator==(const commodity_t &comm) const
virtual commodity_t & strip_annotations(const keep_details_t &what_to_keep)
virtual const commodity_t & referent() const
virtual optional< expr_t > value_expr() const
shared_ptr< base_t > base
virtual void print(std::ostream &out, bool elide_quotes=false, bool print_annotations=false) const
virtual optional< expr_t > value_expr() const
optional< string > qualified_symbol
commodity_pool_t * parent_