19 #ifndef EQFABRIC_ELEMENTVISITOR_H
20 #define EQFABRIC_ELEMENTVISITOR_H
23 # pragma clang diagnostic push
24 # pragma clang diagnostic ignored "-Woverloaded-virtual"
31 template<
class T,
class C >
class ElementVisitor :
public C
42 {
return visitPre( static_cast< const T* >( element )); }
46 {
return visitPost( static_cast< const T* >( element )); }
50 {
return TRAVERSE_CONTINUE; }
54 {
return TRAVERSE_CONTINUE; }
59 # pragma clang diagnostic pop
60 #endif // EQFABRIC_ELEMENTVISITOR_H
virtual VisitorResult visitPre(T *element)
Visit an element on the down traversal.
virtual ~ElementVisitor()
Destruct the visitor.
virtual VisitorResult visitPre(const T *)
Visit an element on a const down traversal.
virtual VisitorResult visitPost(const T *)
Visit an element on a const up traversal.
virtual VisitorResult visitPost(T *element)
Visit an element on the up traversal.
ElementVisitor()
Construct a new visitor.