summaryrefslogtreecommitdiff
path: root/src/journal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal.h')
-rw-r--r--src/journal.h76
1 files changed, 42 insertions, 34 deletions
diff --git a/src/journal.h b/src/journal.h
index 716e2910..613b2b96 100644
--- a/src/journal.h
+++ b/src/journal.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003-2013, John Wiegley. All rights reserved.
+ * Copyright (c) 2003-2015, John Wiegley. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -58,15 +58,17 @@ class account_t;
class parse_context_t;
class parse_context_stack_t;
-typedef std::list<xact_t *> xacts_list;
-typedef std::list<auto_xact_t *> auto_xacts_list;
-typedef std::list<period_xact_t *> period_xacts_list;
-typedef std::pair<mask_t, string> payee_mapping_t;
-typedef std::list<payee_mapping_t> payee_mappings_t;
-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 std::map<string, xact_t *> checksum_map_t;
+typedef std::list<xact_t *> xacts_list;
+typedef std::list<auto_xact_t *> auto_xacts_list;
+typedef std::list<period_xact_t *> period_xacts_list;
+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::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 std::map<string, xact_t *> checksum_map_t;
typedef std::multimap<string, expr_t::check_expr_pair> tag_check_exprs_map;
@@ -115,33 +117,37 @@ public:
#endif // HAVE_BOOST_SERIALIZATION
};
- account_t * master;
- account_t * bucket;
- xacts_list xacts;
- auto_xacts_list auto_xacts;
- period_xacts_list period_xacts;
- std::list<fileinfo_t> sources;
- std::set<string> known_payees;
- std::set<string> known_tags;
- bool fixed_accounts;
- bool fixed_payees;
- bool fixed_commodities;
- bool fixed_metadata;
- bool was_loaded;
- bool force_checking;
- bool check_payees;
- bool day_break;
- payee_mappings_t payee_mappings;
- account_mappings_t account_mappings;
- accounts_map account_aliases;
- account_mappings_t payees_for_unknown_accounts;
- checksum_map_t checksum_map;
- tag_check_exprs_map tag_check_exprs;
- optional<expr_t> value_expr;
- parse_context_t * current_context;
+ account_t * master;
+ account_t * bucket;
+ xacts_list xacts;
+ auto_xacts_list auto_xacts;
+ period_xacts_list period_xacts;
+ std::list<fileinfo_t> sources;
+ std::set<string> known_payees;
+ std::set<string> known_tags;
+ bool fixed_accounts;
+ bool fixed_payees;
+ bool fixed_commodities;
+ bool fixed_metadata;
+ bool was_loaded;
+ bool force_checking;
+ bool check_payees;
+ bool day_break;
+ bool recursive_aliases;
+ bool no_aliases;
+ payee_alias_mappings_t payee_alias_mappings;
+ payee_uuid_mappings_t payee_uuid_mappings;
+ account_mappings_t account_mappings;
+ accounts_map account_aliases;
+ account_mappings_t payees_for_unknown_accounts;
+ checksum_map_t checksum_map;
+ tag_check_exprs_map tag_check_exprs;
+ optional<expr_t> value_expr;
+ parse_context_t * current_context;
enum checking_style_t {
CHECK_PERMISSIVE,
+ CHECK_NORMAL,
CHECK_WARNING,
CHECK_ERROR
} checking_style;
@@ -167,6 +173,8 @@ public:
account_t * find_account(const string& name, bool auto_create = true);
account_t * find_account_re(const string& regexp);
+ account_t * expand_aliases(string name);
+
account_t * register_account(const string& name, post_t * post,
account_t * master = NULL);
string register_payee(const string& name, xact_t * xact);