Quark  0.1
ItemConsumer.h++
Go to the documentation of this file.
1 #ifndef __libquark_gui__ItemConsumer_hxx
2 #define __libquark_gui__ItemConsumer_hxx
3 
4 namespace quark {
5 namespace gui {
6 
12 template<class T> class ItemConsumer
13 {
14  public:
15 
16  virtual ~ItemConsumer() { };
17 
19  virtual void consume(T *item) = 0;
20 };
21 
27 template<class T> class ConstItemConsumer
28 {
29  public:
30 
31  virtual ~ConstItemConsumer() { };
32 
34  virtual void consume(const T *item) = 0;
35 };
36 
37 } // namespace gui
38 } // namespace quark
39 
40 #endif // __libquark_gui__ItemConsumer_hxx
virtual void consume(T *item)=0
Consumes an item.
An interface for consuming (const) items supplied by a producer.
Definition: ItemConsumer.h++:27
An interface for consuming items supplied by a producer.
Definition: ItemConsumer.h++:12
Definition: BarChartView.h++:6
virtual ~ItemConsumer()
Definition: ItemConsumer.h++:16
virtual ~ConstItemConsumer()
Definition: ItemConsumer.h++:31