diff options
Diffstat (limited to 'src/account.h')
-rw-r--r-- | src/account.h | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/account.h b/src/account.h index b726facf..76e839eb 100644 --- a/src/account.h +++ b/src/account.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 @@ -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,8 @@ public: } void add_post(post_t * post); + void add_deferred_post(const string& uuid, post_t * post); + void apply_deferred_posts(); bool remove_post(post_t * post); posts_list::iterator posts_begin() { @@ -257,7 +261,11 @@ public: mutable optional<xdata_t> xdata_; bool has_xdata() const { +#if BOOST_VERSION >= 105600 + return xdata_ != NULL; +#else return xdata_; +#endif } void clear_xdata(); xdata_t& xdata() { |