34 typedef visitor::Tool<> VisitingTool;
39 DEFINE_PROCESSABLE_BY (VisitingTool);
69 void talk_to (
string guy)
71 cout <<
_Fmt{
"Hello %s, nice to meet you...\n"} % guy;
77 , Types<Boss,BigBoss,Visionary>::List
82 void treat (
Boss&) { talk_to(
"Boss"); }
83 void treat (
BigBoss&) { talk_to(
"Big Boss"); }
108 known_visitor_known_class();
109 visiting_extended_hierarchy();
113 known_visitor_known_class()
122 cout <<
"=== Babbler meets Boss and BigBoss ===\n";
124 VisitingTool& vista (bab);
130 visiting_extended_hierarchy()
138 cout <<
"=== Babbler meets HomoSapiens and Leader ===\n";
140 VisitingTool& vista (bab);
Marker template to declare that some "visiting tool" wants to treat a set of concrete Visitable class...
Marker interface or base class for all "Visitables".
A front-end for using printf-style formatting.
Implementation namespace for support and library code.
virtual ReturnType apply(TOOL &)=0
to be defined by the DEFINE_PROCESSABLE_BY macro in all classes wanting to be treated by some tool ...
Simplistic test class runner.
#define DEFINE_PROCESSABLE_BY(TOOL)
mark a Visitable subclass as actually treat-able by some "visiting tool" base interface.
A library implementation of the Visitor Pattern tailored specifically to Lumiera's needs within the S...