torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
torc::generic::VisitorApplier< _Tp > Class Template Reference

#include <VisitorApplier.hpp>

+ Collaboration diagram for torc::generic::VisitorApplier< _Tp >:

Public Member Functions

 VisitorApplier (_Tp &inVisitor)
 
template<typename _Up >
void operator() (const boost::shared_ptr< _Up > &inVisited) const throw (Error)
 

Private Attributes

_Tp & mVisitor
 

Detailed Description

template<typename _Tp>
class torc::generic::VisitorApplier< _Tp >

This is an utility functor class that can be used to apply visitor to a list of genOM objects. The type _Tp should be replaced by the visitor type.

Definition at line 28 of file VisitorApplier.hpp.

Constructor & Destructor Documentation

template<typename _Tp>
torc::generic::VisitorApplier< _Tp >::VisitorApplier ( _Tp &  inVisitor)
inline

Definition at line 30 of file VisitorApplier.hpp.

30  :
31  mVisitor(inVisitor) {
32  }

Member Function Documentation

template<typename _Tp>
template<typename _Up >
void torc::generic::VisitorApplier< _Tp >::operator() ( const boost::shared_ptr< _Up > &  inVisited) const
throw (Error
)
inline

Definition at line 34 of file VisitorApplier.hpp.

35  {
36  try {
37  inVisited->accept(mVisitor);
38  } catch(Error& e) {
39  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
40  throw;
41  }
42  }

Field Documentation

template<typename _Tp>
_Tp& torc::generic::VisitorApplier< _Tp >::mVisitor
private

Definition at line 44 of file VisitorApplier.hpp.


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