Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Visitor< T > Class Template Reference

Base Visitor class, for use with any type. More...

#include <vv2.h>

List of all members.

Public Methods

virtual void visit (ArgBase &obj)
 Perform the action on the object.

void operator() (ArgBase &obj)
 Allows function object syntax.

virtual void visit (ArgBase &obj)
 Perform the action on the object.


Protected Types

typedef T ArgBase
typedef T ArgBase

Protected Methods

virtual void do_visit (ArgBase &obj)=0
 Performs an action on an object based on ArgBase \obj The object to perform the action on.

virtual void try_visit (ArgBase &obj)
 Provided to allow Visitor to have the same interface as SV.

virtual void do_visit (ArgBase &obj)=0
 Performs an action on an object based on ArgBase \obj The object to perform the action on.

virtual void try_visit (ArgBase &obj)
 Provided to allow Visitor to have the same interface as SV.


Detailed Description

template<typename T>
class Visitor< T >

Base Visitor class, for use with any type.

Can be subclassed to call T.accept(), or as a Virtual Visitor


Member Typedef Documentation

template<typename T>
typedef T Visitor< T >::ArgBase [protected]
 

template<typename T>
typedef T Visitor< T >::ArgBase [protected]
 


Member Function Documentation

template<typename T>
virtual void Visitor< T >::do_visit ArgBase   obj [protected, pure virtual]
 

Performs an action on an object based on ArgBase \obj The object to perform the action on.

template<typename T>
virtual void Visitor< T >::try_visit ArgBase   obj [inline, protected, virtual]
 

Provided to allow Visitor to have the same interface as SV.

Calls do_visit unconditionally

00029    {
00030       do_visit(obj);
00031    }

template<typename T>
virtual void Visitor< T >::visit ArgBase   obj [inline, virtual]
 

Perform the action on the object.

Parameters:
obj  The object to perform the action on

00039    {
00040       do_visit(obj);
00041    }

template<typename T>
void Visitor< T >::operator() ArgBase   obj [inline]
 

Allows function object syntax.

00047    {
00048       visit(obj);
00049    }

template<typename T>
virtual void Visitor< T >::do_visit ArgBase   obj [protected, pure virtual]
 

Performs an action on an object based on ArgBase \obj The object to perform the action on.

template<typename T>
virtual void Visitor< T >::try_visit ArgBase   obj [inline, protected, virtual]
 

Provided to allow Visitor to have the same interface as SV.

Calls do_visit unconditionally

00031    {
00032       do_visit(obj);
00033    }

template<typename T>
virtual void Visitor< T >::visit ArgBase   obj [inline, virtual]
 

Perform the action on the object.

Parameters:
obj  The object to perform the action on

00041    {
00042       do_visit(obj);
00043    }


The documentation for this class was generated from the following files:
Generated on Mon Apr 7 19:43:58 2003 for DuTree by doxygen1.2.18