From 3215fd71a499648f5ff8e992bd1ff66e963858a0 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Sun, 30 May 2010 02:27:25 -0600 Subject: Added optional item_handler::title() method --- src/chain.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/chain.h') diff --git a/src/chain.h b/src/chain.h index fbde9f0a..935f2935 100644 --- a/src/chain.h +++ b/src/chain.h @@ -65,14 +65,19 @@ public: TRACE_DTOR(item_handler); } + virtual void title(const string& str) { + if (handler) + handler->title(str); + } + virtual void flush() { - if (handler.get()) + if (handler) handler->flush(); } virtual void operator()(T& item) { - if (handler.get()) { + if (handler) { check_for_signal(); - (*handler.get())(item); + (*handler)(item); } } -- cgit v1.2.3