visitor: This is the "dynamic polymorphism" part. More...
#include <visitor.hpp>

Classes | |
| struct | visitor_helper |
Public Member Functions | |
| virtual void | visit (move_ptr move)=0 |
| virtual void | visit (attack_ptr attack)=0 |
| virtual void | visit (recruit_ptr recruit)=0 |
| virtual void | visit (recall_ptr recall)=0 |
| virtual void | visit (suppose_dead_ptr sup_d)=0 |
Protected Member Functions | |
| visitor () | |
| virtual | ~visitor () |
| bool | process (size_t, team &, side_actions &, side_actions::iterator itor) |
| This function is available for derived classes so they can inherit from enable_visit_all without having to override visit(); i.e., the below implementation can be used as a default. | |
| void | visit_all_actions () |
visitor: This is the "dynamic polymorphism" part.
Abstract base class for all the visitors (cf GoF Visitor Design Pattern) the whiteboard uses. visitor does not inherit from enable_visit_all because it tends to make it more "difficult" for derived classes to inherit from both visitor and enable_visit_all.
Definition at line 138 of file visitor.hpp.
| wb::visitor::visitor | ( | ) | [inline, protected] |
Definition at line 151 of file visitor.hpp.
| virtual wb::visitor::~visitor | ( | ) | [inline, protected, virtual] |
Definition at line 152 of file visitor.hpp.
| bool wb::visitor::process | ( | size_t | , | |
| team & | , | |||
| side_actions & | , | |||
| side_actions::iterator | itor | |||
| ) | [inline, protected] |
This function is available for derived classes so they can inherit from enable_visit_all without having to override visit(); i.e., the below implementation can be used as a default.
Definition at line 159 of file visitor.hpp.
| virtual void wb::visitor::visit | ( | attack_ptr | attack | ) | [pure virtual] |
Implemented in wb::validate_visitor.
| virtual void wb::visitor::visit | ( | recruit_ptr | recruit | ) | [pure virtual] |
Implemented in wb::validate_visitor.
| virtual void wb::visitor::visit | ( | suppose_dead_ptr | sup_d | ) | [pure virtual] |
Implemented in wb::validate_visitor.
| virtual void wb::visitor::visit | ( | recall_ptr | recall | ) | [pure virtual] |
Implemented in wb::validate_visitor.
| virtual void wb::visitor::visit | ( | move_ptr | move | ) | [pure virtual] |
Implemented in wb::validate_visitor.
Referenced by wb::suppose_dead::accept(), wb::recruit::accept(), wb::recall::accept(), and wb::move::accept().

| void wb::visitor::visit_all_actions | ( | ) | [inline, protected] |
Definition at line 163 of file visitor.hpp.
References wb::visitor::visitor_helper::visit_all_actions_helper().

| Generated by doxygen 1.7.1 on Thu May 24 2012 01:26:42 for The Battle for Wesnoth | Gna! | Forum | Wiki | CIA | devdocs |