43 typedef visitor::Tool<> VisitingTool;
48 DEFINE_PROCESSABLE_BY (VisitingTool);
78 void talk_to (
string guy)
80 cout <<
_Fmt{
"Hello %s, nice to meet you...\n"} % guy;
86 , Types<Boss,BigBoss,Visionary>::List
91 void treat (
Boss&) { talk_to(
"Boss"); }
92 void treat (
BigBoss&) { talk_to(
"Big Boss"); }
117 known_visitor_known_class();
118 visiting_extended_hierarchy();
122 known_visitor_known_class()
131 cout <<
"=== Babbler meets Boss and BigBoss ===\n";
133 VisitingTool& vista (bab);
139 visiting_extended_hierarchy()
147 cout <<
"=== Babbler meets HomoSapiens and Leader ===\n";
149 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 ...
Simple 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...