Loading...
Searching...
No Matches
ledger::auto_xact_t Class Reference

#include <xact.h>

Inheritance diagram for ledger::auto_xact_t:
Collaboration diagram for ledger::auto_xact_t:

Classes

struct  deferred_tag_data_t

Public Types

typedef std::list< deferred_tag_data_tdeferred_notes_list
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

void add_flags (const flags_t arg)
virtual void add_post (post_t *post)
virtual void append_note (const char *p, scope_t &scope, bool overwrite_existing=true)
 auto_xact_t ()
 auto_xact_t (const auto_xact_t &other)
 auto_xact_t (const predicate_t &_predicate)
virtual optional< date_taux_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)
virtual void extend_xact (xact_base_t &xact, parse_context_t &context)
bool finalize ()
flags_t flags () const
virtual optional< value_tget_tag (const mask_t &tag_mask, const optional< mask_t > &value_mask=none, bool inherit=true) const
virtual optional< value_tget_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 ()
string id () const
virtual expr_t::ptr_op_t lookup (const symbol_t::kind_t kind, const string &name)
value_t magnitude () const
virtual bool operator!= (const item_t &xact)
virtual bool operator== (const item_t &xact)
virtual void parse_tags (const char *p, scope_t &, bool overwrite_existing=true)
posts_list::iterator posts_begin ()
posts_list::iterator posts_end ()
virtual date_t primary_date () const
virtual bool remove_post (post_t *post)
std::size_t seq () const
void set_flags (const flags_t arg)
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
virtual bool valid () const
bool verify ()
virtual ~auto_xact_t ()

Public Attributes

optional< date_t_date
optional< date_t_date_aux
state_t _state
post_tactive_post
optional< expr_t::check_expr_listcheck_exprs
optional< deferred_notes_listdeferred_notes
journal_tjournal
std::map< string, bool > memoized_results
optional< string_mapmetadata
optional< stringnote
optional< position_tpos
posts_list posts
predicate_t predicate
bool try_quick_match

Static Public Attributes

static scope_tdefault_scope
static empty_scope_tempty_scope
static bool use_aux_date

Protected Attributes

flags_t _flags

Detailed Description

Definition at line 127 of file xact.h.

Member Typedef Documentation

◆ deferred_notes_list

Definition at line 147 of file xact.h.

◆ flags_t

typedef uint_least16_t ledger::flags::supports_flags< uint_least16_t, uint_least16_t >::flags_t
inherited

Definition at line 50 of file flags.h.

◆ string_map

typedef std::map<string, tag_data_t, std::function<bool(string, string)> > ledger::item_t::string_map
inherited

Definition at line 95 of file item.h.

◆ tag_data_t

typedef std::pair<optional<value_t>, bool> ledger::item_t::tag_data_t
inherited

Definition at line 93 of file item.h.

Member Enumeration Documentation

◆ state_t

enum ledger::item_t::state_t
inherited
Enumerator
UNCLEARED 
CLEARED 
PENDING 

Definition at line 91 of file item.h.

Constructor & Destructor Documentation

◆ auto_xact_t() [1/3]

ledger::auto_xact_t::auto_xact_t ( )
inline

Definition at line 152 of file xact.h.

References active_post, auto_xact_t(), TRACE_CTOR, and try_quick_match.

Referenced by auto_xact_t(), auto_xact_t(), auto_xact_t(), and ~auto_xact_t().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ auto_xact_t() [2/3]

ledger::auto_xact_t::auto_xact_t ( const auto_xact_t & other)
inline

Definition at line 155 of file xact.h.

References active_post, auto_xact_t(), predicate, TRACE_CTOR, try_quick_match, and ledger::xact_base_t::xact_base_t().

Here is the call graph for this function:

◆ auto_xact_t() [3/3]

ledger::auto_xact_t::auto_xact_t ( const predicate_t & _predicate)
inline

Definition at line 161 of file xact.h.

References active_post, auto_xact_t(), predicate, TRACE_CTOR, and try_quick_match.

Here is the call graph for this function:

◆ ~auto_xact_t()

virtual ledger::auto_xact_t::~auto_xact_t ( )
inlinevirtual

Definition at line 167 of file xact.h.

References auto_xact_t(), and TRACE_DTOR.

Here is the call graph for this function:

Member Function Documentation

◆ add_flags()

void ledger::flags::supports_flags< uint_least16_t, uint_least16_t >::add_flags ( const flags_t arg)
inlineinherited

Definition at line 87 of file flags.h.

◆ add_post()

virtual void ledger::xact_base_t::add_post ( post_t * post)
virtualinherited

Reimplemented in ledger::xact_t.

◆ append_note()

virtual void ledger::item_t::append_note ( const char * p,
scope_t & scope,
bool overwrite_existing = true )
virtualinherited

References ledger::scope_t::scope_t().

Here is the call graph for this function:

◆ aux_date()

virtual optional< date_t > ledger::item_t::aux_date ( ) const
inlinevirtualinherited

Reimplemented in ledger::post_t.

Definition at line 191 of file item.h.

References _date_aux.

Referenced by date().

Here is the caller graph for this function:

◆ clear_flags()

void ledger::flags::supports_flags< uint_least16_t, uint_least16_t >::clear_flags ( )
inlineinherited

Definition at line 84 of file flags.h.

◆ clear_xdata()

void ledger::xact_base_t::clear_xdata ( )
inherited

◆ copy_details()

virtual void ledger::item_t::copy_details ( const item_t & item)
inlinevirtualinherited

Reimplemented in ledger::post_t.

Definition at line 118 of file item.h.

References _date, _date_aux, ledger::flags::supports_flags< T, U >::flags(), item_t(), metadata, note, pos, ledger::flags::supports_flags< uint_least16_t >::set_flags(), set_state(), and state().

Referenced by ledger::post_t::copy_details(), and item_t().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ date()

virtual date_t ledger::item_t::date ( ) const
inlinevirtualinherited

Reimplemented in ledger::post_t.

Definition at line 180 of file item.h.

References _date, assert, aux_date(), and use_aux_date.

Here is the call graph for this function:

◆ define()

virtual void ledger::item_t::define ( const symbol_t::kind_t ,
const string & ,
expr_t::ptr_op_t  )
virtualinherited

Reimplemented from ledger::scope_t.

◆ description()

virtual string ledger::auto_xact_t::description ( )
inlinevirtual

Implements ledger::scope_t.

Definition at line 171 of file xact.h.

References ledger::item_t::pos.

◆ drop_flags()

void ledger::flags::supports_flags< uint_least16_t, uint_least16_t >::drop_flags ( const flags_t arg)
inlineinherited

Definition at line 90 of file flags.h.

◆ extend_xact()

virtual void ledger::auto_xact_t::extend_xact ( xact_base_t & xact,
parse_context_t & context )
virtual

References ledger::xact_base_t::xact_base_t().

Here is the call graph for this function:

◆ finalize()

bool ledger::xact_base_t::finalize ( )
inherited

◆ flags()

flags_t ledger::flags::supports_flags< uint_least16_t, uint_least16_t >::flags ( ) const
inlineinherited

Definition at line 74 of file flags.h.

◆ get_tag() [1/2]

virtual optional< value_t > ledger::item_t::get_tag ( const mask_t & tag_mask,
const optional< mask_t > & value_mask = none,
bool inherit = true ) const
virtualinherited

Reimplemented in ledger::post_t.

◆ get_tag() [2/2]

virtual optional< value_t > ledger::item_t::get_tag ( const string & tag,
bool inherit = true ) const
virtualinherited

Reimplemented in ledger::post_t.

Referenced by id().

Here is the caller graph for this function:

◆ has_date()

virtual bool ledger::item_t::has_date ( ) const
inlinevirtualinherited

Definition at line 176 of file item.h.

References _date.

◆ has_flags()

bool ledger::flags::supports_flags< uint_least16_t, uint_least16_t >::has_flags ( const flags_t arg) const
inlineinherited

Definition at line 77 of file flags.h.

Referenced by ledger::post_t::must_balance().

Here is the caller graph for this function:

◆ has_tag() [1/2]

virtual bool ledger::item_t::has_tag ( const mask_t & tag_mask,
const optional< mask_t > & value_mask = none,
bool inherit = true ) const
virtualinherited

Reimplemented in ledger::post_t.

◆ has_tag() [2/2]

virtual bool ledger::item_t::has_tag ( const string & tag,
bool inherit = true ) const
virtualinherited

Reimplemented in ledger::post_t.

◆ has_xdata()

bool ledger::xact_base_t::has_xdata ( )
inherited

◆ id()

string ledger::item_t::id ( ) const
inlineinherited

Definition at line 137 of file item.h.

References get_tag(), and seq().

Here is the call graph for this function:

◆ lookup()

virtual expr_t::ptr_op_t ledger::item_t::lookup ( const symbol_t::kind_t kind,
const string & name )
virtualinherited

Implements ledger::scope_t.

Reimplemented in ledger::post_t, and ledger::xact_t.

◆ magnitude()

value_t ledger::xact_base_t::magnitude ( ) const
inherited

◆ operator!=()

virtual bool ledger::item_t::operator!= ( const item_t & xact)
inlinevirtualinherited

Definition at line 133 of file item.h.

References item_t().

Here is the call graph for this function:

◆ operator==()

virtual bool ledger::item_t::operator== ( const item_t & xact)
inlinevirtualinherited

Definition at line 130 of file item.h.

References item_t().

Here is the call graph for this function:

◆ parse_tags()

virtual void ledger::auto_xact_t::parse_tags ( const char * p,
scope_t & ,
bool overwrite_existing = true )
inlinevirtual

Reimplemented from ledger::item_t.

Definition at line 181 of file xact.h.

References active_post, and deferred_notes.

◆ posts_begin()

posts_list::iterator ledger::xact_base_t::posts_begin ( )
inlineinherited

Definition at line 71 of file xact.h.

References posts.

◆ posts_end()

posts_list::iterator ledger::xact_base_t::posts_end ( )
inlineinherited

Definition at line 74 of file xact.h.

References posts.

◆ primary_date()

virtual date_t ledger::item_t::primary_date ( ) const
inlinevirtualinherited

Reimplemented in ledger::post_t.

Definition at line 187 of file item.h.

References _date, and assert.

◆ remove_post()

virtual bool ledger::xact_base_t::remove_post ( post_t * post)
virtualinherited

◆ seq()

std::size_t ledger::item_t::seq ( ) const
inlineinherited

Definition at line 146 of file item.h.

References pos.

Referenced by id().

Here is the caller graph for this function:

◆ set_flags()

void ledger::flags::supports_flags< uint_least16_t, uint_least16_t >::set_flags ( const flags_t arg)
inlineinherited

Definition at line 81 of file flags.h.

Referenced by ledger::item_t::copy_details().

Here is the caller graph for this function:

◆ set_state()

void ledger::item_t::set_state ( state_t new_state)
inlineinherited

Definition at line 195 of file item.h.

References _state.

Referenced by copy_details().

Here is the caller graph for this function:

◆ set_tag()

virtual string_map::iterator ledger::item_t::set_tag ( const string & tag,
const optional< value_t > & value = none,
const bool overwrite_existing = true )
virtualinherited

◆ state()

virtual state_t ledger::item_t::state ( ) const
inlinevirtualinherited

Definition at line 198 of file item.h.

References _state.

Referenced by copy_details().

Here is the caller graph for this function:

◆ type_context()

virtual value_t::type_t ledger::scope_t::type_context ( ) const
inlinevirtualinherited

Reimplemented in ledger::context_scope_t.

Definition at line 109 of file scope.h.

References ledger::value_t::VOID.

◆ type_required()

virtual bool ledger::scope_t::type_required ( ) const
inlinevirtualinherited

Reimplemented in ledger::context_scope_t.

Definition at line 112 of file scope.h.

◆ valid()

virtual bool ledger::xact_base_t::valid ( ) const
inlinevirtualinherited

Reimplemented in ledger::xact_t.

Definition at line 86 of file xact.h.

◆ verify()

bool ledger::xact_base_t::verify ( )
inherited

Member Data Documentation

◆ _date

optional<date_t> ledger::item_t::_date
inherited

Definition at line 98 of file item.h.

Referenced by copy_details(), date(), has_date(), and primary_date().

◆ _date_aux

optional<date_t> ledger::item_t::_date_aux
inherited

Definition at line 99 of file item.h.

Referenced by aux_date(), and copy_details().

◆ _flags

flags_t ledger::flags::supports_flags< uint_least16_t, uint_least16_t >::_flags
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().

◆ _state

state_t ledger::item_t::_state
inherited

Definition at line 97 of file item.h.

Referenced by item_t(), set_state(), and state().

◆ active_post

post_t* ledger::auto_xact_t::active_post

Definition at line 150 of file xact.h.

Referenced by auto_xact_t(), auto_xact_t(), auto_xact_t(), and parse_tags().

◆ check_exprs

optional<expr_t::check_expr_list> ledger::auto_xact_t::check_exprs

Definition at line 134 of file xact.h.

◆ default_scope

scope_t* ledger::scope_t::default_scope
staticinherited

◆ deferred_notes

optional<deferred_notes_list> ledger::auto_xact_t::deferred_notes

Definition at line 149 of file xact.h.

Referenced by parse_tags().

◆ empty_scope

empty_scope_t* ledger::scope_t::empty_scope
staticinherited

Definition at line 93 of file scope.h.

◆ journal

journal_t* ledger::xact_base_t::journal
inherited

Definition at line 58 of file xact.h.

Referenced by xact_base_t().

◆ memoized_results

std::map<string, bool> ledger::auto_xact_t::memoized_results

Definition at line 132 of file xact.h.

◆ metadata

optional<string_map> ledger::item_t::metadata
inherited

Definition at line 102 of file item.h.

Referenced by copy_details().

◆ note

optional<string> ledger::item_t::note
inherited

Definition at line 100 of file item.h.

Referenced by copy_details(), and item_t().

◆ pos

◆ posts

posts_list ledger::xact_base_t::posts
inherited

Definition at line 59 of file xact.h.

Referenced by posts_begin(), posts_end(), and ledger::xact_posts_iterator::reset().

◆ predicate

predicate_t ledger::auto_xact_t::predicate

Definition at line 130 of file xact.h.

Referenced by auto_xact_t(), and auto_xact_t().

◆ try_quick_match

bool ledger::auto_xact_t::try_quick_match

Definition at line 131 of file xact.h.

Referenced by auto_xact_t(), auto_xact_t(), and auto_xact_t().

◆ use_aux_date

bool ledger::item_t::use_aux_date
staticinherited

Definition at line 174 of file item.h.

Referenced by date().


The documentation for this class was generated from the following file: