te::common::Visitor< T, R > Class Template Referenceabstract

A generic class for visitors. More...

#include <Visitor.h>

Public Types

typedef R ReturnType
 

Public Member Functions

virtual ReturnType visit (T &visited)=0
 Pure virtual function that visitors must implement in order to visit some other object of type T. More...
 

Detailed Description

template<class T, class R = void>
class te::common::Visitor< T, R >

A generic class for visitors.

This class defines a pure virtual function for visiting an object of type T.

This function may return a value (see the R type in template declaration).

Requirements on types:

  • T: the type of visitable;
  • R: the return type for the visit method.
See also
BaseVisitor, BaseVisitable

Definition at line 52 of file Visitor.h.

Member Typedef Documentation

◆ ReturnType

template<class T , class R = void>
typedef R te::common::Visitor< T, R >::ReturnType

Definition at line 56 of file Visitor.h.

Member Function Documentation

◆ visit()

template<class T , class R = void>
virtual ReturnType te::common::Visitor< T, R >::visit ( T &  visited)
pure virtual

Pure virtual function that visitors must implement in order to visit some other object of type T.

Parameters
visitedThe object to be visited.

The documentation for this class was generated from the following file: