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

The root of all hierarchies that can be visited. More...

#include <BaseVisitable.h>

Public Types

typedef R ReturnType
 
typedef T VisitorType
 

Public Member Functions

virtual ReturnType accept (VisitorType &guest) const =0
 It call the visit method from the guest object. More...
 

Protected Member Functions

virtual ~BaseVisitable ()
 Destructor. More...
 

Detailed Description

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

The root of all hierarchies that can be visited.

This class defines a pure virtual function that subclasses must implement in order to be visited.

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

Requirements on types:

  • T: the type of visitor;
  • R: the return type for the accept method.
See also
BaseVisitor, Visitor

Definition at line 53 of file BaseVisitable.h.

Member Typedef Documentation

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

Definition at line 58 of file BaseVisitable.h.

template<class T, class R = void>
typedef T te::common::BaseVisitable< T, R >::VisitorType

Definition at line 57 of file BaseVisitable.h.

Constructor & Destructor Documentation

template<class T, class R = void>
virtual te::common::BaseVisitable< T, R >::~BaseVisitable ( )
inlineprotectedvirtual

Destructor.

Definition at line 72 of file BaseVisitable.h.

Member Function Documentation

template<class T, class R = void>
virtual ReturnType te::common::BaseVisitable< T, R >::accept ( VisitorType guest) const
pure virtual

It call the visit method from the guest object.

Parameters
guestThe guest or visitor.
Returns
Any valid value define by the template type R.

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