summaryrefslogtreecommitdiff
path: root/src/journal.h
diff options
context:
space:
mode:
authorChristophe Rhodes <csr21@cantab.net>2014-05-13 16:08:10 +0100
committerChristophe Rhodes <csr21@cantab.net>2014-05-13 16:08:10 +0100
commitda51f5b51051bdc6a0fe10325a3b8b1a2f30d21d (patch)
tree291f2a32b099aca4842d03273abb349ff98d0572 /src/journal.h
parentbcb28b066f626a551e71fd0ef544e33c55770ea4 (diff)
downloadfork-ledger-da51f5b51051bdc6a0fe10325a3b8b1a2f30d21d.tar.gz
fork-ledger-da51f5b51051bdc6a0fe10325a3b8b1a2f30d21d.tar.bz2
fork-ledger-da51f5b51051bdc6a0fe10325a3b8b1a2f30d21d.zip
support payee uuid directive
The semantics of this are a little bit tricky: we want, if we come across a transaction with exactly the given UUID, to set the transaction's payee to be the specified one. We need to set that payee before the first post in the transaction is parsed, otherwise that post will inherit the wrong payee; however, we need to do it after the transaction's tags have been parsed. The implementation as it is in this commit is potentially a little wasteful, if there are post-like (non-comment non-assertion) entries in the transaction that don't successfully parse as posts.
Diffstat (limited to 'src/journal.h')
-rw-r--r--src/journal.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/journal.h b/src/journal.h
index 4458ba93..803b9511 100644
--- a/src/journal.h
+++ b/src/journal.h
@@ -63,6 +63,8 @@ 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;
@@ -134,6 +136,7 @@ public:
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;