![]() |
Leosac
0.8.0
Open Source Access Control
|
#include <Visitor.hpp>
Inheritance diagram for Leosac::Tools::Visitor< T >:
Collaboration diagram for Leosac::Tools::Visitor< T >:Public Types | |
| using | VisitableT = std::remove_reference_t< std::remove_const_t< T > > |
Public Member Functions | |
| virtual void | visit (const VisitableT &) |
| virtual void | visit (VisitableT &visitable) |
Public Member Functions inherited from Leosac::Tools::BaseVisitor | |
| virtual | ~BaseVisitor ()=default |
| virtual void | cannot_visit (const IVisitable &) |
| Invoked when the visitable cannot be visited by the visitor. More... | |
A Visitor object.
By subclassing this class, an object will be able to visit objects of type T.
For this to work, the T object needs to subclass IVisitable and use the MAKE_VISITABLE() macro.
The Visitor<T> class declare and define 2 visit() methods. One for const Visitable and one for non-const Visitable. By default the non-const version forward the call to the const version.
Definition at line 64 of file Visitor.hpp.
| using Leosac::Tools::Visitor< T >::VisitableT = std::remove_reference_t<std::remove_const_t<T> > |
Definition at line 67 of file Visitor.hpp.
|
inlinevirtual |
Definition at line 74 of file Visitor.hpp.
|
inlinevirtual |
Definition at line 77 of file Visitor.hpp.