proj home

Files   Classes   Functions   Hierarchy  

visitorPrint< T > Class Template Reference

Print functional object in simulated templated virtual functions pattern. More...

#include <visitorprint.h>

Inheritance diagram for visitorPrint< T >:
Collaboration diagram for visitorPrint< T >:

List of all members.

Public Member Functions

 visitorPrint (T arg_)
 Capture the type which is used to in the template part of the simulated virtual function.
void visit (ElementA &w) const
 Execute templated virtual funtion print on data type ElementA.
void visit (ElementB &w) const
 Execute templated virtual funtion print on data type ElementB.


Detailed Description

template<typename T>
class visitorPrint< T >

Print functional object in simulated templated virtual functions pattern.

Definition at line 11 of file visitorprint.h.


Constructor & Destructor Documentation

template<typename T>
visitorPrint< T >::visitorPrint ( T  arg_  )  [inline]

Capture the type which is used to in the template part of the simulated virtual function.

Definition at line 19 of file visitorprint.h.

00019 : arg(arg_) {}


Member Function Documentation

template<typename T>
void visitorPrint< T >::visit ( ElementB w  )  const [inline, virtual]

Execute templated virtual funtion print on data type ElementB.

Reimplemented from Visitor.

Definition at line 24 of file visitorprint.h.

References ElementB::print().

00024 { w.print(arg); }

template<typename T>
void visitorPrint< T >::visit ( ElementA w  )  const [inline, virtual]

Execute templated virtual funtion print on data type ElementA.

Reimplemented from Visitor.

Definition at line 22 of file visitorprint.h.

References ElementA::print().

00022 { w.print(arg); }


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

Generated on Fri Mar 4 00:50:24 2011 for Chelton Evans Source by  doxygen 1.5.8