summaryrefslogtreecommitdiff
path: root/src/generate.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2011-07-19 23:29:41 -0500
committerJohn Wiegley <johnw@newartisans.com>2011-07-19 23:29:41 -0500
commitcf35984971341b8a8688eb02a22bcbc1772991d1 (patch)
tree8defec43b26a6cf9a216dac8b41d79504c32ad93 /src/generate.h
parent966b6fc359bacad6b22e79fd5afbec0ea80e8d6a (diff)
downloadfork-ledger-cf35984971341b8a8688eb02a22bcbc1772991d1.tar.gz
fork-ledger-cf35984971341b8a8688eb02a22bcbc1772991d1.tar.bz2
fork-ledger-cf35984971341b8a8688eb02a22bcbc1772991d1.zip
Use Boost iterator_facade to create new iterators
Diffstat (limited to 'src/generate.h')
-rw-r--r--src/generate.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/generate.h b/src/generate.h
index 25ad41ea..f9207ff5 100644
--- a/src/generate.h
+++ b/src/generate.h
@@ -48,7 +48,9 @@ namespace ledger {
class session_t;
-class generate_posts_iterator : public posts_iterator
+class generate_posts_iterator
+ : public iterator_facade_base<generate_posts_iterator, post_t *,
+ boost::forward_traversal_tag>
{
session_t& session;
unsigned int seed;
@@ -105,7 +107,7 @@ public:
TRACE_DTOR(generate_posts_iterator);
}
- virtual post_t * operator()();
+ virtual void increment();
protected:
void generate_string(std::ostream& out, int len, bool only_alpha = false);