#include <post.h>
Classes | |
struct | compare_by_date_and_sequence |
struct | xdata_t |
Public Types | |
typedef uint_least16_t | flags_t |
enum | state_t { UNCLEARED = 0 , CLEARED , PENDING } |
typedef std::map< string, tag_data_t, std::function< bool(string, string)> > | string_map |
typedef std::pair< optional< value_t >, bool > | tag_data_t |
Public Member Functions | |
std::size_t | account_id () const |
void | add_flags (const flags_t arg) |
void | add_to_value (value_t &value, const optional< expr_t & > &expr=none) const |
virtual void | append_note (const char *p, scope_t &scope, bool overwrite_existing=true) |
virtual optional< date_t > | aux_date () const |
void | clear_flags () |
void | clear_xdata () |
virtual void | copy_details (const item_t &item) |
virtual date_t | date () const |
virtual void | define (const symbol_t::kind_t, const string &, expr_t::ptr_op_t) |
virtual string | description () |
void | drop_flags (const flags_t arg) |
flags_t | flags () const |
virtual optional< value_t > | get_tag (const mask_t &tag_mask, const optional< mask_t > &value_mask=none, bool inherit=true) const |
virtual optional< value_t > | get_tag (const string &tag, bool inherit=true) const |
virtual bool | has_date () const |
bool | has_flags (const flags_t arg) const |
virtual bool | has_tag (const mask_t &tag_mask, const optional< mask_t > &value_mask=none, bool inherit=true) const |
virtual bool | has_tag (const string &tag, bool inherit=true) const |
bool | has_xdata () const |
string | id () const |
virtual expr_t::ptr_op_t | lookup (const symbol_t::kind_t kind, const string &name) |
bool | must_balance () const |
virtual bool | operator!= (const item_t &xact) |
virtual bool | operator== (const item_t &xact) |
virtual void | parse_tags (const char *p, scope_t &scope, bool overwrite_existing=true) |
string | payee () const |
string | payee_from_tag () const |
post_t (account_t *_account, const amount_t &_amount, flags_t _flags=0x00, const optional< string > &_note=none) | |
post_t (account_t *_account=NULL, flags_t _flags=0x00) | |
post_t (const post_t &post) | |
virtual date_t | primary_date () const |
account_t * | reported_account () |
const account_t * | reported_account () const |
amount_t | resolve_expr (scope_t &scope, expr_t &expr) |
std::size_t | seq () const |
void | set_flags (const flags_t arg) |
void | set_payee (const string &payee) |
void | set_reported_account (account_t *account) |
void | set_state (state_t new_state) |
virtual string_map::iterator | set_tag (const string &tag, const optional< value_t > &value=none, const bool overwrite_existing=true) |
virtual state_t | state () const |
virtual value_t::type_t | type_context () const |
virtual bool | type_required () const |
bool | valid () const |
virtual date_t | value_date () const |
std::size_t | xact_id () const |
xdata_t & | xdata () |
const xdata_t & | xdata () const |
virtual | ~post_t () |
Public Attributes | |
optional< date_t > | _date |
optional< date_t > | _date_aux |
state_t | _state |
account_t * | account |
amount_t | amount |
optional< expr_t > | amount_expr |
optional< amount_t > | assigned_amount |
optional< datetime_t > | checkin |
optional< datetime_t > | checkout |
optional< amount_t > | cost |
optional< amount_t > | given_cost |
optional< string_map > | metadata |
optional< string > | note |
optional< position_t > | pos |
xact_t * | xact |
optional< xdata_t > | xdata_ |
Static Public Attributes | |
static scope_t * | default_scope |
static empty_scope_t * | empty_scope |
static bool | use_aux_date |
Protected Attributes | |
flags_t | _flags |
Friends | |
class | xact_t |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Definition at line 82 of file post.h.
References ledger::flags::supports_flags< uint_least16_t >::_flags, account, ITEM_NORMAL, ledger::item_t::item_t(), post_t(), TRACE_CTOR, and xact.
Referenced by copy_details(), ledger::post_t::compare_by_date_and_sequence::operator()(), post_t(), post_t(), post_t(), reported_account(), xdata(), and ~post_t().
|
inline |
Definition at line 88 of file post.h.
References ledger::flags::supports_flags< uint_least16_t >::_flags, account, amount, ITEM_NORMAL, ledger::item_t::item_t(), post_t(), TRACE_CTOR, and xact.
|
inline |
Definition at line 96 of file post.h.
References account, amount, assigned_amount, checkin, checkout, copy_details(), cost, ledger::item_t::item_t(), post_t(), TRACE_CTOR, xact, and xdata_.
|
inlinevirtual |
Definition at line 110 of file post.h.
References post_t(), and TRACE_DTOR.
std::size_t ledger::post_t::account_id | ( | ) | const |
|
inlineinherited |
void ledger::post_t::add_to_value | ( | value_t & | value, |
const optional< expr_t & > & | expr = none ) const |
|
virtualinherited |
|
virtual |
Reimplemented from ledger::item_t.
|
inlineinherited |
|
inline |
|
inlinevirtual |
Reimplemented from ledger::item_t.
Definition at line 159 of file post.h.
References ledger::item_t::copy_details(), ledger::item_t::item_t(), post_t(), and xdata_.
Referenced by post_t().
|
virtual |
Reimplemented from ledger::item_t.
Referenced by ledger::day_of_week_posts::operator()().
|
virtualinherited |
Reimplemented from ledger::scope_t.
|
inlinevirtual |
|
inlineinherited |
|
inlineinherited |
|
virtual |
Reimplemented from ledger::item_t.
|
virtual |
Reimplemented from ledger::item_t.
|
inlinevirtualinherited |
|
inlineinherited |
Definition at line 77 of file flags.h.
Referenced by ledger::post_t::must_balance().
|
virtual |
Reimplemented from ledger::item_t.
|
virtual |
Reimplemented from ledger::item_t.
|
inline |
|
inlineinherited |
|
virtual |
Reimplemented from ledger::item_t.
|
inline |
Definition at line 147 of file post.h.
References ledger::flags::supports_flags< uint_least16_t >::has_flags(), POST_IS_TIMELOG, POST_MUST_BALANCE, and POST_VIRTUAL.
|
inlinevirtualinherited |
|
inlinevirtualinherited |
|
virtualinherited |
Reimplemented in ledger::auto_xact_t.
References ledger::scope_t::scope_t().
string ledger::post_t::payee | ( | ) | const |
string ledger::post_t::payee_from_tag | ( | ) | const |
|
virtual |
Reimplemented from ledger::item_t.
Referenced by ledger::post_t::compare_by_date_and_sequence::operator()().
|
inline |
|
inline |
Definition at line 245 of file post.h.
References post_t(), and reported_account().
|
inlineinherited |
|
inlineinherited |
Definition at line 81 of file flags.h.
Referenced by ledger::item_t::copy_details().
|
inline |
|
inlineinherited |
Definition at line 195 of file item.h.
References _state.
Referenced by copy_details().
|
virtualinherited |
|
inlinevirtualinherited |
Definition at line 198 of file item.h.
References _state.
Referenced by copy_details().
|
inlinevirtualinherited |
Reimplemented in ledger::context_scope_t.
Definition at line 109 of file scope.h.
References ledger::value_t::VOID.
|
inlinevirtualinherited |
Reimplemented in ledger::context_scope_t.
bool ledger::post_t::valid | ( | ) | const |
|
virtual |
std::size_t ledger::post_t::xact_id | ( | ) | const |
|
inline |
Definition at line 223 of file post.h.
References xdata_.
Referenced by ledger::filter_posts::operator()(), ledger::related_posts::operator()(), and xdata().
|
inline |
|
friend |
|
inherited |
Definition at line 98 of file item.h.
Referenced by copy_details(), date(), has_date(), and primary_date().
|
inherited |
Definition at line 99 of file item.h.
Referenced by aux_date(), and copy_details().
|
protectedinherited |
Definition at line 53 of file flags.h.
Referenced by ledger::item_t::item_t(), ledger::post_t::post_t(), and ledger::post_t::post_t().
|
inherited |
Definition at line 97 of file item.h.
Referenced by item_t(), set_state(), and state().
account_t* ledger::post_t::account |
Definition at line 66 of file post.h.
Referenced by post_t(), post_t(), post_t(), reported_account(), and set_reported_account().
amount_t ledger::post_t::amount |
optional<amount_t> ledger::post_t::assigned_amount |
optional<datetime_t> ledger::post_t::checkin |
optional<datetime_t> ledger::post_t::checkout |
optional<amount_t> ledger::post_t::cost |
|
staticinherited |
Definition at line 92 of file scope.h.
Referenced by ledger::global_scope_t::pop_report(), and ledger::global_scope_t::push_report().
|
staticinherited |
|
inherited |
Definition at line 102 of file item.h.
Referenced by copy_details().
|
inherited |
Definition at line 100 of file item.h.
Referenced by copy_details(), and item_t().
|
inherited |
Definition at line 101 of file item.h.
Referenced by copy_details(), ledger::auto_xact_t::description(), ledger::period_xact_t::description(), ledger::post_t::description(), ledger::xact_t::description(), ledger::post_t::compare_by_date_and_sequence::operator()(), and seq().
|
staticinherited |
xact_t* ledger::post_t::xact |
|
mutable |
Definition at line 215 of file post.h.
Referenced by clear_xdata(), copy_details(), has_xdata(), post_t(), reported_account(), and xdata().