diff options
Diffstat (limited to 'src/account.h')
-rw-r--r-- | src/account.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/account.h b/src/account.h index 7d51a08e..3452bba7 100644 --- a/src/account.h +++ b/src/account.h @@ -114,11 +114,31 @@ public: account_t * find_account(const string& name, bool auto_create = true); account_t * find_account_re(const string& regexp); + typedef transform_iterator<function<account_t *(accounts_map::value_type&)>, + accounts_map::iterator> + accounts_map_seconds_iterator; + + accounts_map_seconds_iterator accounts_begin() { + return make_transform_iterator + (accounts.begin(), bind(&accounts_map::value_type::second, _1)); + } + accounts_map_seconds_iterator accounts_end() { + return make_transform_iterator + (accounts.end(), bind(&accounts_map::value_type::second, _1)); + } + void add_post(post_t * post) { posts.push_back(post); } bool remove_post(post_t * post); + posts_list::iterator posts_begin() { + return posts.begin(); + } + posts_list::iterator posts_end() { + return posts.end(); + } + virtual expr_t::ptr_op_t lookup(const symbol_t::kind_t kind, const string& name); |