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

#include <account.h>

+ Inheritance diagram for ledger::account_t:
+ Collaboration diagram for ledger::account_t:

Classes

struct  xdata_t
 

Public Types

typedef transform_iterator< function< account_t *(accounts_map::value_type &)>, accounts_map::iterator accounts_map_seconds_iterator)
 
typedefflags_t
 

Public Member Functions

 account_t (account_t *_parent=NULL, const string &_name="", const optional< string > &_note=none)
 
 account_t (const account_t &other)
 
accounts_map_seconds_iterator accounts_begin ()
 
accounts_map_seconds_iterator accounts_end ()
 
void add_account (account_t *acct)
 
void add_deferred_post (const string &uuid, post_t *post)
 
void add_flags (const flags_t arg)
 
void add_post (post_t *post)
 
value_t amount (const optional< bool > real_only=false, const optional< expr_t & > &expr=none) const
 
void apply_deferred_posts ()
 
std::size_t children_with_flags (xdata_t::flags_t flags) const
 
bool children_with_xdata () const
 
void clear_flags ()
 
void clear_xdata ()
 
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)
 
const xdata_t::details_tfamily_details (bool gather_all=true) const
 
account_tfind_account (const string &name, bool auto_create=true)
 
account_tfind_account_re (const string &regexp)
 
flags_t flags () const
 
string fullname () const
 
bool has_flags (const flags_t arg) const
 
bool has_xdata () const
 
bool has_xflags (xdata_t::flags_t flags) const
 
virtual expr_t::ptr_op_t lookup (const symbol_t::kind_t kind, const string &name)
 
 operator string () const
 
string partial_name (bool flat=false) const
 
posts_list::iterator posts_begin ()
 
posts_list::iterator posts_end ()
 
bool remove_account (account_t *acct)
 
bool remove_post (post_t *post)
 
const xdata_t::details_tself_details (bool gather_all=true) const
 
void set_flags (const flags_t arg)
 
value_t total (const optional< expr_t & > &expr=none) const
 
virtual value_t::type_t type_context () const
 
virtual bool type_required () const
 
bool valid () const
 
xdata_txdata ()
 
const xdata_txdata () const
 
virtual ~account_t ()
 

Public Attributes

string _fullname
 
accounts_map accounts
 
optional< deferred_posts_map_tdeferred_posts
 
unsigned short depth
 
string name
 
optional< stringnote
 
account_tparent
 
posts_list posts
 
optional< expr_tvalue_expr
 
optional< xdata_txdata_
 

Static Public Attributes

static scope_tdefault_scope
 
static empty_scope_tempty_scope
 

Protected Attributes

flags_t _flags
 

Friends

class journal_t
 

Detailed Description

Definition at line 58 of file account.h.

Member Typedef Documentation

◆ accounts_map_seconds_iterator

typedef transform_iterator<function<account_t *(accounts_map::value_type&)>, accounts_map::iterator ledger::account_t::accounts_map_seconds_iterator)

Definition at line 130 of file account.h.

◆ flags_t

template<typename T = boost::uint_least8_t, typename U = T>
typedef T ledger::flags::supports_flags< T, U >::flags_t
inherited

Definition at line 50 of file flags.h.

Constructor & Destructor Documentation

◆ account_t() [1/2]

ledger::account_t::account_t ( account_t * _parent = NULL,
const string & _name = "",
const optional< string > & _note = none )
inline

Definition at line 80 of file account.h.

References TRACE_CTOR.

◆ account_t() [2/2]

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

Definition at line 92 of file account.h.

References TRACE_CTOR.

◆ ~account_t()

virtual ledger::account_t::~account_t ( )
virtual

Member Function Documentation

◆ accounts_begin()

accounts_map_seconds_iterator ledger::account_t::accounts_begin ( )
inline

Definition at line 132 of file account.h.

References accounts.

◆ accounts_end()

accounts_map_seconds_iterator ledger::account_t::accounts_end ( )
inline

Definition at line 136 of file account.h.

References accounts.

◆ add_account()

void ledger::account_t::add_account ( account_t * acct)
inline

Definition at line 117 of file account.h.

References accounts, and name.

◆ add_deferred_post()

void ledger::account_t::add_deferred_post ( const string & uuid,
post_t * post )

◆ add_flags()

template<typename T = boost::uint_least8_t, typename U = T>
void ledger::flags::supports_flags< T, U >::add_flags ( const flags_t arg)
inlineinherited

Definition at line 87 of file flags.h.

References ledger::flags::supports_flags< T, U >::_flags, and ledger::downcast().

+ Here is the call graph for this function:

◆ add_post()

void ledger::account_t::add_post ( post_t * post)

◆ amount()

value_t ledger::account_t::amount ( const optional< bool > real_only = false,
const optional< expr_t & > & expr = none ) const

◆ apply_deferred_posts()

void ledger::account_t::apply_deferred_posts ( )

◆ children_with_flags()

std::size_t ledger::account_t::children_with_flags ( xdata_t::flags_t flags) const

◆ children_with_xdata()

bool ledger::account_t::children_with_xdata ( ) const

◆ clear_flags()

template<typename T = boost::uint_least8_t, typename U = T>
void ledger::flags::supports_flags< T, U >::clear_flags ( )
inlineinherited

Definition at line 84 of file flags.h.

References ledger::flags::supports_flags< T, U >::_flags.

◆ clear_xdata()

void ledger::account_t::clear_xdata ( )

◆ define()

virtual void ledger::scope_t::define ( const symbol_t::kind_t ,
const string & ,
expr_t::ptr_op_t  )
inlinevirtualinherited

Reimplemented in ledger::report_t, ledger::child_scope_t, ledger::bind_scope_t, ledger::symbol_scope_t, and ledger::item_t.

Definition at line 104 of file scope.h.

Referenced by ledger::child_scope_t::define(), and ledger::bind_scope_t::define().

+ Here is the caller graph for this function:

◆ description()

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

Implements ledger::scope_t.

Definition at line 107 of file account.h.

References fullname().

+ Here is the call graph for this function:

◆ drop_flags()

template<typename T = boost::uint_least8_t, typename U = T>
void ledger::flags::supports_flags< T, U >::drop_flags ( const flags_t arg)
inlineinherited

Definition at line 90 of file flags.h.

References ledger::flags::supports_flags< T, U >::_flags, and ledger::downcast().

+ Here is the call graph for this function:

◆ family_details()

const xdata_t::details_t & ledger::account_t::family_details ( bool gather_all = true) const

◆ find_account()

account_t * ledger::account_t::find_account ( const string & name,
bool auto_create = true )

Referenced by ledger::posts_as_equity::create_accounts().

+ Here is the caller graph for this function:

◆ find_account_re()

account_t * ledger::account_t::find_account_re ( const string & regexp)

◆ flags()

template<typename T = boost::uint_least8_t, typename U = T>
flags_t ledger::flags::supports_flags< T, U >::flags ( ) const
inlineinherited

Definition at line 74 of file flags.h.

References ledger::flags::supports_flags< T, U >::_flags.

Referenced by has_xflags(), ledger::flags::basic_t< T, U >::operator T(), and ledger::flags::basic_t< T, U >::operator U().

+ Here is the caller graph for this function:

◆ fullname()

string ledger::account_t::fullname ( ) const

Referenced by description(), operator string(), and ledger::account_compare::operator()().

+ Here is the caller graph for this function:

◆ has_flags()

template<typename T = boost::uint_least8_t, typename U = T>
bool ledger::flags::supports_flags< T, U >::has_flags ( const flags_t arg) const
inlineinherited

Definition at line 77 of file flags.h.

References ledger::flags::supports_flags< T, U >::_flags, and ledger::downcast().

+ Here is the call graph for this function:

◆ has_xdata()

bool ledger::account_t::has_xdata ( ) const
inline

Definition at line 268 of file account.h.

References xdata_.

◆ has_xflags()

bool ledger::account_t::has_xflags ( xdata_t::flags_t flags) const
inline

Definition at line 288 of file account.h.

References ledger::flags::supports_flags< T, U >::flags(), and xdata_.

+ Here is the call graph for this function:

◆ lookup()

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

Implements ledger::scope_t.

◆ operator string()

ledger::account_t::operator string ( ) const
inline

Definition at line 111 of file account.h.

References fullname().

+ Here is the call graph for this function:

◆ partial_name()

string ledger::account_t::partial_name ( bool flat = false) const

◆ posts_begin()

posts_list::iterator ledger::account_t::posts_begin ( )
inline

Definition at line 146 of file account.h.

References posts.

◆ posts_end()

posts_list::iterator ledger::account_t::posts_end ( )
inline

Definition at line 149 of file account.h.

References posts.

◆ remove_account()

bool ledger::account_t::remove_account ( account_t * acct)
inline

Definition at line 120 of file account.h.

References accounts, and name.

◆ remove_post()

bool ledger::account_t::remove_post ( post_t * post)

◆ self_details()

const xdata_t::details_t & ledger::account_t::self_details ( bool gather_all = true) const

◆ set_flags()

template<typename T = boost::uint_least8_t, typename U = T>
void ledger::flags::supports_flags< T, U >::set_flags ( const flags_t arg)
inlineinherited

Definition at line 81 of file flags.h.

References ledger::flags::supports_flags< T, U >::_flags, and ledger::downcast().

Referenced by ledger::flags::basic_t< T, U >::basic_t(), ledger::flags::basic_t< T, U >::basic_t(), ledger::flags::basic_t< T, U >::operator=(), and ledger::flags::basic_t< T, U >::operator=().

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

◆ total()

value_t ledger::account_t::total ( const optional< expr_t & > & expr = none) const

◆ 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()

bool ledger::account_t::valid ( ) const

◆ xdata() [1/2]

xdata_t & ledger::account_t::xdata ( )
inline

Definition at line 272 of file account.h.

References xdata_.

◆ xdata() [2/2]

const xdata_t & ledger::account_t::xdata ( ) const
inline

Definition at line 277 of file account.h.

References assert, and xdata_.

Friends And Related Symbol Documentation

◆ journal_t

Definition at line 158 of file account.h.

Member Data Documentation

◆ _flags

◆ _fullname

string ledger::account_t::_fullname
mutable

Definition at line 75 of file account.h.

◆ accounts

accounts_map ledger::account_t::accounts

Definition at line 70 of file account.h.

Referenced by accounts_begin(), accounts_end(), add_account(), and remove_account().

◆ default_scope

scope_t* ledger::scope_t::default_scope
staticinherited

◆ deferred_posts

optional<deferred_posts_map_t> ledger::account_t::deferred_posts

Definition at line 72 of file account.h.

◆ depth

unsigned short ledger::account_t::depth

Definition at line 69 of file account.h.

◆ empty_scope

empty_scope_t* ledger::scope_t::empty_scope
staticinherited

Definition at line 93 of file scope.h.

◆ name

string ledger::account_t::name

Definition at line 67 of file account.h.

Referenced by add_account(), and remove_account().

◆ note

optional<string> ledger::account_t::note

Definition at line 68 of file account.h.

◆ parent

account_t* ledger::account_t::parent

Definition at line 66 of file account.h.

◆ posts

posts_list ledger::account_t::posts

Definition at line 71 of file account.h.

Referenced by posts_begin(), and posts_end().

◆ value_expr

optional<expr_t> ledger::account_t::value_expr

Definition at line 73 of file account.h.

◆ xdata_

optional<xdata_t> ledger::account_t::xdata_
mutable

Definition at line 266 of file account.h.

Referenced by has_xdata(), has_xflags(), xdata(), and xdata().


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