|
Leosac
0.7.0
OpenSourceAccessControl
|
Base class to make an object visitable. More...
#include <IVisitable.hpp>
Inheritance diagram for Leosac::Tools::IVisitable:Public Member Functions | |
| virtual void | accept (::Leosac::Tools::BaseVisitor &)=0 |
Accept a visitor that may mutate this. More... | |
| virtual void | accept (::Leosac::Tools::BaseVisitor &) const =0 |
Accept a visitor that will not mutate this. More... | |
Static Protected Member Functions | |
| template<class T > | |
| static bool | visitor_dispatch (T &visited, BaseVisitor &visitor, bool abort_on_failure) |
Base class to make an object visitable.
An type wishing to be visitable can simply inherit from this class and call the MAKE_VISITABLE() macro in a public section of its definition.
The visitor/visitable infrastructure is NOT statically checked. What this means is that accept()ing a visitor that is not able to visit us will result in an assert.
Definition at line 43 of file IVisitable.hpp.
|
pure virtual |
Accept a visitor that may mutate this.
|
pure virtual |
Accept a visitor that will not mutate this.
|
inlinestaticprotected |
Definition at line 58 of file IVisitable.hpp.