proj home

Files   Classes   Functions   Hierarchy  

visitorPrint2< T > Class Template Reference

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

#include <visitorprint2.h>

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

List of all members.

Public Member Functions

 visitorPrint2 (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 visitorPrint2< T >

Print functional object in simulated templated virtual functions pattern.

Definition at line 10 of file visitorprint2.h.


Constructor & Destructor Documentation

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

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

Definition at line 18 of file visitorprint2.h.

00018 : arg(arg_) {}


Member Function Documentation

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

Execute templated virtual funtion print on data type ElementB.

Reimplemented from Visitor.

Definition at line 23 of file visitorprint2.h.

References ElementB::print2().

00023 { w.print2(arg); }

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

Execute templated virtual funtion print on data type ElementA.

Reimplemented from Visitor.

Definition at line 21 of file visitorprint2.h.

References ElementA::print2().

00021 { w.print2(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