Namespaces | |
namespace | flags |
namespace | python |
Typedefs | |
typedef std::pair< mask_t, account_t * > | account_mapping_t |
typedef std::list< account_mapping_t > | account_mappings_t |
typedef std::map< string, account_t * > | accounts_map |
typedef shared_ptr< item_handler< account_t > > | acct_handler_ptr |
typedef std::list< auto_xact_t * > | auto_xacts_list |
typedef std::map< string, xact_t * > | checksum_map_t |
typedef gregorian::date | date |
typedef gregorian::date_duration | date_duration |
typedef boost::gregorian::date_iterator | date_iterator_t |
typedef boost::gregorian::date | date_t |
typedef boost::posix_time::ptime | datetime_t |
typedef std::map< string, posts_list > | deferred_posts_map_t |
typedef boost::filesystem::filesystem_error | filesystem_error |
typedef boost::filesystem::ifstream | ifstream |
typedef boost::filesystem::ofstream | ofstream |
typedef flags::basic_t< parse_flags_enum_t, uint_least8_t > | parse_flags_t |
typedef boost::filesystem::path | path |
typedef std::pair< mask_t, string > | payee_alias_mapping_t |
typedef std::list< payee_alias_mapping_t > | payee_alias_mappings_t |
typedef std::pair< string, string > | payee_uuid_mapping_t |
typedef std::list< payee_uuid_mapping_t > | payee_uuid_mappings_t |
typedef std::list< period_xact_t * > | period_xacts_list |
typedef shared_ptr< item_handler< post_t > > | post_handler_ptr |
typedef std::list< post_t * > | posts_list |
typedef std::map< datetime_t, amount_t > | price_map_t |
typedef posix_time::ptime | ptime |
typedef posix_time::seconds | seconds |
typedef std::string | string |
typedef std::list< string > | strings_list |
typedef std::multimap< string, expr_t::check_expr_pair > | tag_check_exprs_map |
typedef ptime::time_duration_type | time_duration |
typedef datetime_t::time_duration_type | time_duration_t |
typedef std::list< xact_t * > | xacts_list |
Enumerations | |
enum | format_type_t { FMT_WRITTEN , FMT_PRINTED , FMT_CUSTOM } |
enum | hash_type_t { NO_HASHES = 0 , HASH_SHA512 = 1 , HASH_SHA512_Half = 2 } |
enum | log_level_t { LOG_OFF = 0 , LOG_CRIT , LOG_FATAL , LOG_ASSERT , LOG_ERROR , LOG_VERIFY , LOG_WARN , LOG_INFO , LOG_EXCEPT , LOG_DEBUG , LOG_TRACE , LOG_ALL } |
enum | parse_flags_enum_t { PARSE_DEFAULT = 0x00 , PARSE_PARTIAL = 0x01 , PARSE_SINGLE = 0x02 , PARSE_NO_MIGRATE = 0x04 , PARSE_NO_REDUCE = 0x08 , PARSE_NO_ASSIGN = 0x10 , PARSE_NO_ANNOT = 0x20 , PARSE_OP_CONTEXT = 0x40 , PARSE_SOFT_FAIL = 0x80 } |
Functions | |
template<typename T> | |
value_t & | add_or_set_value (value_t &lhs, const T &rhs) |
annotated_commodity_t & | as_annotated_commodity (commodity_t &commodity) |
const annotated_commodity_t & | as_annotated_commodity (const commodity_t &commodity) |
expr_t::ptr_op_t | as_expr (const value_t &val) |
balance_t | average_lot_prices (const balance_t &bal) |
sort_value_t | calc_sort_value (const expr_t::ptr_op_t op) |
template<> | |
expr_t::ptr_op_t | call_scope_t::get< expr_t::ptr_op_t > (std::size_t index, bool) |
template<> | |
bool | call_scope_t::has< expr_t::ptr_op_t > (std::size_t index) |
post_handler_ptr | chain_handlers (post_handler_ptr handler, report_t &report, bool for_accounts_report=false) |
post_handler_ptr | chain_post_handlers (post_handler_ptr base_handler, report_t &report, bool for_accounts_report=false) |
post_handler_ptr | chain_pre_post_handlers (post_handler_ptr base_handler, report_t &report) |
optional< price_point_t > | commodity_quote_from_script (commodity_t &commodity, const commodity_t *exchange_commodity) |
value_t | convert_command (call_scope_t &scope) |
void | debug_assert (const string &reason, const string &func, const string &file, std::size_t line) |
string | digest_to_hex (const boost::uuids::detail::sha1::digest_type &message_digest, size_t len=sizeof(boost::uuids::detail::sha1::digest_type) *2) |
template<typename T, typename U> | |
T & | downcast (U &object) |
const string & | either_or (const string &first, const string &second) |
string | error_context () |
value_t | eval_command (call_scope_t &args) |
value_t | expr_value (expr_t::ptr_op_t op) |
void | extend_post (post_t &post, journal_t &journal) |
string | file_context (const path &file, std::size_t line) |
template<typename T> | |
T & | find_scope (child_scope_t &scope, bool skip_this=true, bool prefer_direct_parents=false) |
template<typename T> | |
T & | find_scope (scope_t &scope, bool prefer_direct_parents=false) |
void | finish_timer (const char *name) |
value_t | format_command (call_scope_t &args) |
std::string | format_date (const date_t &when, const format_type_t format_type=FMT_PRINTED, const optional< const char * > &format=none) |
std::string | format_datetime (const datetime_t &when, const format_type_t format_type=FMT_PRINTED, const optional< const char * > &format=none) |
value_t | get_comment (item_t &item) |
void | handle_debug_options (int argc, char *argv[]) |
bool | is_eq (const char *p, const char *n) |
bool | is_expr (const value_t &val) |
Dealing with expr pointers tucked into value objects. | |
bool | is_valid (const date_t &moment) |
bool | is_valid (const datetime_t &moment) |
string | item_context (const item_t &item, const string &desc) |
string | join_args (call_scope_t &args) |
void | justify (std::ostream &out, const std::string &str, int width, bool right=false, bool redden=false) |
string | line_context (const string &line, const string::size_type pos=0, const string::size_type end_pos=0) |
void | logger_func (log_level_t level) |
std::pair< xact_t *, account_t * > | lookup_probable_account (const string &ident, xacts_list::reverse_iterator iter, xacts_list::reverse_iterator end, account_t *ref_account=NULL) |
string | lowered (const string &str) |
value_t | mask_value (const string &str) |
int | mk_wcwidth (boost::uint32_t ucs) |
char * | next_element (char *buf, bool variable=false) |
string | op_context (const expr_t::ptr_op_t op, const expr_t::ptr_op_t locus=NULL) |
parse_context_t | open_for_reading (const path &pathname, const path &cwd) |
string | operator+ (const char *left, const string &right) |
std::ostream & | operator<< (std::ostream &out, const account_t &account) |
std::ostream & | operator<< (std::ostream &out, const amount_t &amt) |
std::ostream & | operator<< (std::ostream &out, const annotation_t &details) |
std::ostream & | operator<< (std::ostream &out, const balance_t &bal) |
std::ostream & | operator<< (std::ostream &out, const commodity_t &comm) |
std::ostream & | operator<< (std::ostream &out, const date_duration_t &duration) |
template<typename ResultType> | |
std::ostream & | operator<< (std::ostream &out, const expr_base_t< ResultType > &expr) |
std::ostream & | operator<< (std::ostream &out, const expr_t::token_t &token) |
std::ostream & | operator<< (std::ostream &out, const expr_t::token_t::kind_t &kind) |
std::ostream & | operator<< (std::ostream &out, const mask_t &mask) |
std::ostream & | operator<< (std::ostream &out, const value_t &val) |
std::istream & | operator>> (std::istream &in, amount_t &amt) |
value_t | parse_command (call_scope_t &args) |
date_t | parse_date (const char *str) |
date_t | parse_date (const std::string &str) |
datetime_t | parse_datetime (const char *str) |
datetime_t | parse_datetime (const std::string &str) |
int | peek_next_nonws (std::istream &in) |
value_t | period_command (call_scope_t &args) |
void | print_item (std::ostream &out, const item_t &item, const string &prefix="") |
strings_list | process_arguments (strings_list args, scope_t &scope) |
void | process_environment (const char **envp, const string &tag, scope_t &scope) |
bool | process_option (const string &whence, const string &name, scope_t &scope, const char *arg, const string &varname) |
void | push_sort_value (std::list< sort_value_t > &sort_values, expr_t::ptr_op_t node, scope_t &scope) |
void | put_account (property_tree::ptree &pt, const account_t &acct, function< bool(const account_t &)> pred) |
void | put_amount (property_tree::ptree &pt, const amount_t &amt, bool commodity_details=false) |
void | put_annotation (property_tree::ptree &pt, const annotation_t &details) |
void | put_balance (property_tree::ptree &pt, const balance_t &bal) |
void | put_commodity (property_tree::ptree &pt, const commodity_t &comm, bool commodity_details=false) |
void | put_date (property_tree::ptree &pt, const date_t &when) |
void | put_datetime (property_tree::ptree &pt, const datetime_t &when) |
void | put_mask (property_tree::ptree &pt, const mask_t &mask) |
void | put_metadata (property_tree::ptree &pt, const item_t::string_map &metadata) |
void | put_post (property_tree::ptree &pt, const post_t &post) |
void | put_value (property_tree::ptree &pt, const value_t &value) |
void | put_xact (property_tree::ptree &pt, const xact_t &xact) |
value_t | query_command (call_scope_t &args) |
value_t | report_statistics (call_scope_t &scope) |
path | resolve_path (const path &pathname) |
value_t | scope_value (scope_t *val) |
template<typename T> | |
T * | search_scope (scope_t *ptr, bool prefer_direct_parents=false) |
value_t | select_command (call_scope_t &args) |
void | set_date_format (const char *format) |
void | set_datetime_format (const char *format) |
void | set_expr (value_t &val, expr_t::ptr_op_t op) |
void | set_input_date_format (const char *format) |
void | set_session_context (session_t *session) |
Set the current session context, transferring all static globals to point at the data structures related to this session. | |
string | sha1sum (const string &str, size_t len=sizeof(boost::uuids::detail::sha1::digest_type) *2) |
void | show_period_tokens (std::ostream &out, const string &arg) |
char * | skip_ws (char *ptr) |
bool | sort_value_is_less_than (const std::list< sort_value_t > &left_values, const std::list< sort_value_t > &right_values) |
value_t | source_command (call_scope_t &scope) |
string | source_context (const path &file, const std::istream::pos_type pos, const std::istream::pos_type end_pos, const string &prefix="") |
strings_list | split_arguments (const char *line) |
value_t | split_cons_expr (expr_t::ptr_op_t op) |
void | start_timer (const char *name, log_level_t lvl) |
void | stop_timer (const char *name) |
optional< date_time::weekdays > | string_to_day_of_week (const std::string &str) |
optional< date_time::months_of_year > | string_to_month_of_year (const std::string &str) |
value_t | string_value (const string &str="") |
value_t | template_command (call_scope_t &args) |
template<typename T> | |
void | throw_func (const string &message) |
void | times_initialize () |
void | times_shutdown () |
string | to_string (long num) |
string | to_string (std::size_t num) |
char * | trim_ws (char *ptr) |
string | value_context (const value_t &val) |
void | warning_func (const string &message) |
value_t | xact_command (call_scope_t &args) |
Variables | |
std::ostringstream | _ctxt_buffer |
std::ostringstream | _desc_buffer |
std::string | _init_file |
std::ostringstream | _log_buffer |
log_level_t | _log_level |
std::ostream * | _log_stream |
string | empty_string |
optional< datetime_t > | epoch |
date_time::weekdays | start_of_week |
const string | version |
optional< int > | year_directive_year |
typedef std::pair<mask_t, account_t *> ledger::account_mapping_t |
typedef std::list<account_mapping_t> ledger::account_mappings_t |
typedef std::map< string, account_t * > ledger::accounts_map |
typedef shared_ptr<item_handler<account_t> > ledger::acct_handler_ptr |
typedef std::list< auto_xact_t * > ledger::auto_xacts_list |
typedef std::map<string, xact_t *> ledger::checksum_map_t |
typedef gregorian::date ledger::date |
typedef gregorian::date_duration ledger::date_duration |
typedef boost::gregorian::date_iterator ledger::date_iterator_t |
typedef boost::gregorian::date ledger::date_t |
typedef boost::posix_time::ptime ledger::datetime_t |
typedef std::map<string, posts_list> ledger::deferred_posts_map_t |
typedef boost::filesystem::filesystem_error ledger::filesystem_error |
typedef boost::filesystem::ifstream ledger::ifstream |
typedef boost::filesystem::ofstream ledger::ofstream |
typedef flags::basic_t<parse_flags_enum_t, uint_least8_t> ledger::parse_flags_t |
typedef boost::filesystem::path ledger::path |
typedef std::pair<mask_t, string> ledger::payee_alias_mapping_t |
typedef std::list<payee_alias_mapping_t> ledger::payee_alias_mappings_t |
typedef std::pair<string, string> ledger::payee_uuid_mapping_t |
typedef std::list<payee_uuid_mapping_t> ledger::payee_uuid_mappings_t |
typedef std::list< period_xact_t * > ledger::period_xacts_list |
typedef shared_ptr<item_handler<post_t> > ledger::post_handler_ptr |
typedef std::list< post_t * > ledger::posts_list |
typedef std::map<datetime_t, amount_t> ledger::price_map_t |
typedef posix_time::ptime ledger::ptime |
typedef posix_time::seconds ledger::seconds |
typedef std::string ledger::string |
typedef std::list<string> ledger::strings_list |
typedef std::multimap<string, expr_t::check_expr_pair> ledger::tag_check_exprs_map |
typedef ptime::time_duration_type ledger::time_duration |
typedef datetime_t::time_duration_type ledger::time_duration_t |
typedef std::list< xact_t * > ledger::xacts_list |
enum ledger::hash_type_t |
enum ledger::log_level_t |
Definition at line 996 of file value.h.
References ledger::value_t::is_null().
|
inline |
Definition at line 225 of file annotate.h.
References downcast().
|
inline |
Definition at line 229 of file annotate.h.
References downcast().
expr_t::ptr_op_t ledger::as_expr | ( | const value_t & | val | ) |
sort_value_t ledger::calc_sort_value | ( | const expr_t::ptr_op_t | op | ) |
|
inline |
Definition at line 561 of file scope.h.
References ledger::call_scope_t::get().
|
inline |
Definition at line 474 of file scope.h.
References ledger::value_t::ANY, and ledger::call_scope_t::has().
|
inline |
Definition at line 105 of file chain.h.
References chain_post_handlers(), and chain_pre_post_handlers().
post_handler_ptr ledger::chain_post_handlers | ( | post_handler_ptr | base_handler, |
report_t & | report, | ||
bool | for_accounts_report = false ) |
post_handler_ptr ledger::chain_pre_post_handlers | ( | post_handler_ptr | base_handler, |
report_t & | report ) |
optional< price_point_t > ledger::commodity_quote_from_script | ( | commodity_t & | commodity, |
const commodity_t * | exchange_commodity ) |
value_t ledger::convert_command | ( | call_scope_t & | scope | ) |
void ledger::debug_assert | ( | const string & | reason, |
const string & | func, | ||
const string & | file, | ||
std::size_t | line ) |
|
inline |
|
inline |
Definition at line 442 of file utils.h.
Referenced by as_annotated_commodity(), and as_annotated_commodity().
string ledger::error_context | ( | ) |
value_t ledger::eval_command | ( | call_scope_t & | args | ) |
value_t ledger::expr_value | ( | expr_t::ptr_op_t | op | ) |
|
inline |
Definition at line 222 of file scope.h.
References ledger::child_scope_t::parent, search_scope(), and throw_.
Referenced by ledger::call_scope_t::context().
|
inline |
Definition at line 234 of file scope.h.
References search_scope(), and throw_.
void ledger::finish_timer | ( | const char * | name | ) |
value_t ledger::format_command | ( | call_scope_t & | args | ) |
std::string ledger::format_date | ( | const date_t & | when, |
const format_type_t | format_type = FMT_PRINTED, | ||
const optional< const char * > & | format = none ) |
std::string ledger::format_datetime | ( | const datetime_t & | when, |
const format_type_t | format_type = FMT_PRINTED, | ||
const optional< const char * > & | format = none ) |
void ledger::handle_debug_options | ( | int | argc, |
char * | argv[] ) |
|
inline |
|
inline |
Dealing with expr pointers tucked into value objects.
Definition at line 113 of file expr.h.
References ledger::value_t::as_any(), and ledger::value_t::is_any().
|
inline |
Referenced by ledger::pass_down_posts< Iterator >::pass_down_posts().
|
inline |
Definition at line 566 of file scope.h.
References ledger::call_scope_t::size().
|
inline |
Definition at line 180 of file unistring.h.
References ledger::unistring::width().
string ledger::line_context | ( | const string & | line, |
const string::size_type | pos = 0, | ||
const string::size_type | end_pos = 0 ) |
void ledger::logger_func | ( | log_level_t | level | ) |
std::pair< xact_t *, account_t * > ledger::lookup_probable_account | ( | const string & | ident, |
xacts_list::reverse_iterator | iter, | ||
xacts_list::reverse_iterator | end, | ||
account_t * | ref_account = NULL ) |
int ledger::mk_wcwidth | ( | boost::uint32_t | ucs | ) |
Referenced by ledger::unistring::extract_by_width(), and ledger::unistring::width().
|
inline |
string ledger::op_context | ( | const expr_t::ptr_op_t | op, |
const expr_t::ptr_op_t | locus = NULL ) |
|
inline |
Definition at line 115 of file context.h.
References ledger::decrypted_stream_t::open_stream(), ledger::parse_context_t::pathname, resolve_path(), and throw_.
Referenced by ledger::parse_context_stack_t::push().
std::ostream & ledger::operator<< | ( | std::ostream & | out, |
const account_t & | account ) |
|
inline |
Definition at line 772 of file amount.h.
References ledger::amount_t::print(), ledger::amount_t::stream_fullstrings, and ledger::amount_t::unrounded().
|
inline |
Definition at line 151 of file annotate.h.
References ledger::annotation_t::print().
|
inline |
Definition at line 601 of file balance.h.
References ledger::balance_t::print().
|
inline |
Definition at line 285 of file commodity.h.
References ledger::commodity_t::print().
std::ostream & ledger::operator<< | ( | std::ostream & | out, |
const date_duration_t & | duration ) |
std::ostream & ledger::operator<< | ( | std::ostream & | out, |
const expr_base_t< ResultType > & | expr ) |
Definition at line 236 of file exprbase.h.
References ledger::expr_base_t< ResultType >::print().
std::ostream & ledger::operator<< | ( | std::ostream & | out, |
const expr_t::token_t & | token ) |
std::ostream & ledger::operator<< | ( | std::ostream & | out, |
const expr_t::token_t::kind_t & | kind ) |
|
inline |
Definition at line 128 of file mask.h.
References ledger::mask_t::str().
|
inline |
Definition at line 980 of file value.h.
References ledger::value_t::print().
|
inline |
Definition at line 779 of file amount.h.
References ledger::amount_t::parse().
value_t ledger::parse_command | ( | call_scope_t & | args | ) |
date_t ledger::parse_date | ( | const char * | str | ) |
|
inline |
Definition at line 95 of file times.h.
References parse_date().
datetime_t ledger::parse_datetime | ( | const char * | str | ) |
|
inline |
Definition at line 89 of file times.h.
References parse_datetime().
value_t ledger::period_command | ( | call_scope_t & | args | ) |
strings_list ledger::process_arguments | ( | strings_list | args, |
scope_t & | scope ) |
bool ledger::process_option | ( | const string & | whence, |
const string & | name, | ||
scope_t & | scope, | ||
const char * | arg, | ||
const string & | varname ) |
void ledger::push_sort_value | ( | std::list< sort_value_t > & | sort_values, |
expr_t::ptr_op_t | node, | ||
scope_t & | scope ) |
void ledger::put_account | ( | property_tree::ptree & | pt, |
const account_t & | acct, | ||
function< bool(const account_t &)> | pred ) |
void ledger::put_amount | ( | property_tree::ptree & | pt, |
const amount_t & | amt, | ||
bool | commodity_details = false ) |
void ledger::put_annotation | ( | property_tree::ptree & | pt, |
const annotation_t & | details ) |
void ledger::put_balance | ( | property_tree::ptree & | pt, |
const balance_t & | bal ) |
void ledger::put_commodity | ( | property_tree::ptree & | pt, |
const commodity_t & | comm, | ||
bool | commodity_details = false ) |
|
inline |
Definition at line 118 of file times.h.
References FMT_WRITTEN, and format_date().
|
inline |
Definition at line 114 of file times.h.
References FMT_WRITTEN, and format_datetime().
|
inline |
Definition at line 133 of file mask.h.
References ledger::mask_t::str().
void ledger::put_metadata | ( | property_tree::ptree & | pt, |
const item_t::string_map & | metadata ) |
void ledger::put_post | ( | property_tree::ptree & | pt, |
const post_t & | post ) |
void ledger::put_value | ( | property_tree::ptree & | pt, |
const value_t & | value ) |
void ledger::put_xact | ( | property_tree::ptree & | pt, |
const xact_t & | xact ) |
value_t ledger::query_command | ( | call_scope_t & | args | ) |
value_t ledger::report_statistics | ( | call_scope_t & | scope | ) |
Definition at line 991 of file value.h.
Referenced by ledger::report_t::fn_options().
T * ledger::search_scope | ( | scope_t * | ptr, |
bool | prefer_direct_parents = false ) |
Definition at line 201 of file scope.h.
References DEBUG, ledger::scope_t::description(), and search_scope().
Referenced by find_scope(), find_scope(), and search_scope().
value_t ledger::select_command | ( | call_scope_t & | args | ) |
void ledger::set_date_format | ( | const char * | format | ) |
void ledger::set_datetime_format | ( | const char * | format | ) |
void ledger::set_expr | ( | value_t & | val, |
expr_t::ptr_op_t | op ) |
void ledger::set_input_date_format | ( | const char * | format | ) |
void ledger::set_session_context | ( | session_t * | session | ) |
Set the current session context, transferring all static globals to point at the data structures related to this session.
Although Ledger itself is not thread-safe, by locking, switching session context, then unlocking after an operation is done, multiple threads can sequentially make use of the library. Thus, a session_t maintains all of the information relating to a single usage of the Ledger library.
|
inline |
Definition at line 577 of file utils.h.
References digest_to_hex().
void ledger::show_period_tokens | ( | std::ostream & | out, |
const string & | arg ) |
|
inline |
Definition at line 453 of file utils.h.
Referenced by next_element(), and trim_ws().
bool ledger::sort_value_is_less_than | ( | const std::list< sort_value_t > & | left_values, |
const std::list< sort_value_t > & | right_values ) |
value_t ledger::source_command | ( | call_scope_t & | scope | ) |
string ledger::source_context | ( | const path & | file, |
const std::istream::pos_type | pos, | ||
const std::istream::pos_type | end_pos, | ||
const string & | prefix = "" ) |
strings_list ledger::split_arguments | ( | const char * | line | ) |
value_t ledger::split_cons_expr | ( | expr_t::ptr_op_t | op | ) |
void ledger::start_timer | ( | const char * | name, |
log_level_t | lvl ) |
void ledger::stop_timer | ( | const char * | name | ) |
optional< date_time::weekdays > ledger::string_to_day_of_week | ( | const std::string & | str | ) |
optional< date_time::months_of_year > ledger::string_to_month_of_year | ( | const std::string & | str | ) |
Definition at line 968 of file value.h.
Referenced by ledger::option_t< T >::operator()(), and ledger::query_t::query_t().
value_t ledger::template_command | ( | call_scope_t & | args | ) |
|
inline |
Definition at line 49 of file error.h.
References _desc_buffer.
void ledger::times_initialize | ( | ) |
void ledger::times_shutdown | ( | ) |
|
inline |
Definition at line 985 of file value.h.
References ledger::value_t::print().
|
inline |
Definition at line 59 of file error.h.
References _desc_buffer.
Referenced by ledger::parse_context_t::warning(), and ledger::parse_context_t::warning().
value_t ledger::xact_command | ( | call_scope_t & | args | ) |
|
extern |
|
extern |
Referenced by throw_func(), and warning_func().
|
extern |
|
extern |
|
extern |
|
extern |
Referenced by ledger::expr_base_t< value_t >::calc().
|
extern |
|
extern |
|
extern |
|
extern |
|
extern |