From 8f8a94c28e26c0b46a43e89d566c941994645de7 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 13 Apr 2014 23:25:31 -0500 Subject: Add the concept of "deferred postings" This is pretty much exclusively for allowing one to use balance assertions with replicated transactions across multiple files. --- src/account.h | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/account.h') 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 posts_list; typedef std::map accounts_map; +typedef std::map 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 note; - unsigned short depth; - accounts_map accounts; - posts_list posts; - optional value_expr; + account_t * parent; + string name; + optional note; + unsigned short depth; + accounts_map accounts; + posts_list posts; + optional deferred_posts; + optional 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() { -- cgit v1.2.3