diff options
author | John Wiegley <johnw@newartisans.com> | 2014-04-13 23:25:31 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2014-04-13 23:26:14 -0500 |
commit | 8f8a94c28e26c0b46a43e89d566c941994645de7 (patch) | |
tree | 3cbd52816734c55fb6233b9a3f7fb35cb0b36fd9 /src/account.h | |
parent | 634aa589cd97d088524ae2fb68ec6120d5e4a873 (diff) | |
download | fork-ledger-8f8a94c28e26c0b46a43e89d566c941994645de7.tar.gz fork-ledger-8f8a94c28e26c0b46a43e89d566c941994645de7.tar.bz2 fork-ledger-8f8a94c28e26c0b46a43e89d566c941994645de7.zip |
Add the concept of "deferred postings"
This is pretty much exclusively for allowing one to use balance
assertions with replicated transactions across multiple files.
Diffstat (limited to 'src/account.h')
-rw-r--r-- | src/account.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/account.h b/src/account.h index f6f764cc..3ce93fba 100644 --- a/src/account.h +++ b/src/account.h @@ -52,6 +52,7 @@ class post_t; typedef std::list<post_t *> posts_list; typedef std::map<string, account_t *> accounts_map; +typedef std::map<string, posts_list> deferred_posts_map_t; class account_t : public supports_flags<>, public scope_t { @@ -61,13 +62,14 @@ class account_t : public supports_flags<>, public scope_t #define ACCOUNT_GENERATED 0x04 // account never actually existed public: - account_t * parent; - string name; - optional<string> note; - unsigned short depth; - accounts_map accounts; - posts_list posts; - optional<expr_t> value_expr; + account_t * parent; + string name; + optional<string> note; + unsigned short depth; + accounts_map accounts; + posts_list posts; + optional<deferred_posts_map_t> deferred_posts; + optional<expr_t> value_expr; mutable string _fullname; #if DOCUMENT_MODEL @@ -136,6 +138,7 @@ public: } void add_post(post_t * post); + void add_deferred_post(const string& uuid, post_t * post); bool remove_post(post_t * post); posts_list::iterator posts_begin() { |