torc-master
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
torc::generic::_impl::Copier< class LogicalResponse > Class Template Referenceabstract

#include <Cloning.hpp>

+ Inheritance diagram for torc::generic::_impl::Copier< class LogicalResponse >:
+ Collaboration diagram for torc::generic::_impl::Copier< class LogicalResponse >:

Public Types

typedef LogicalResponse Type
 
typedef boost::shared_ptr< TypePointer
 

Public Member Functions

Pointer operator() (const Pointer &inSource, const ObjectFactorySharedPtr &inFactory) throw (Error)
 
void visit (LogicalResponse &inLogicalResponse) throw (Error)
 
 Copier ()
 
 ~Copier () throw ()
 
virtual void visit (_Tp &client)=0 throw (Error)
 

Private Attributes

ObjectFactorySharedPtr mFactory
 
Pointer mReturnVal
 

Detailed Description

template<>
class torc::generic::_impl::Copier< class LogicalResponse >

Definition at line 2595 of file Cloning.hpp.

Member Typedef Documentation

typedef boost::shared_ptr<Type> torc::generic::_impl::Copier< class LogicalResponse >::Pointer

Definition at line 2598 of file Cloning.hpp.

Definition at line 2597 of file Cloning.hpp.

Constructor & Destructor Documentation

Definition at line 2643 of file Cloning.hpp.

2643  : Type::Visitor(), mFactory(), mReturnVal() {
2644  }
torc::generic::_impl::Copier< class LogicalResponse >::~Copier ( )
throw (
)
inline

Definition at line 2646 of file Cloning.hpp.

2646  {
2647  }

Member Function Documentation

Pointer torc::generic::_impl::Copier< class LogicalResponse >::operator() ( const Pointer inSource,
const ObjectFactorySharedPtr inFactory 
)
throw (Error
)
inline

Definition at line 2600 of file Cloning.hpp.

2601  {
2602  mFactory = inFactory;
2603  inSource->accept(*this);
2604  return mReturnVal;
2605  }
template<typename _Tp >
virtual void torc::generic::VisitorType< _Tp >::visit ( _Tp &  client)
throw (Error
)
pure virtualinherited

Visit the target object. This will typically be a derived leaf type.

Parameters
[in,out]clientA reference to the target object
Exceptions
ErrorException generated by any of the functions called from inside visit()

+ Here is the caller graph for this function:

void torc::generic::_impl::Copier< class LogicalResponse >::visit ( LogicalResponse inLogicalResponse)
throw (Error
)
inline

Definition at line 2607 of file Cloning.hpp.

2607  {
2608  try {
2609  LogicalResponseSharedPtr logicalResponsePtr;
2610  mFactory->create(logicalResponsePtr);
2611  logicalResponsePtr->setResponseType(inLogicalResponse.getResponseType());
2612  if(NULL != inLogicalResponse.getConnectedPort()) {
2613 
2614  PortSharedPtr clonedPort = clone(inLogicalResponse.getConnectedPort(), mFactory);
2615  logicalResponsePtr->setConnectedPort(clonedPort);
2616  }
2617  if(NULL != inLogicalResponse.getConnectedPortListAlias()) {
2618  PortListAliasSharedPtr newPortListAlias;
2619  mFactory->create(newPortListAlias);
2620  newPortListAlias->setName(inLogicalResponse.getConnectedPortListAlias()->getName());
2621  PortListSharedPtr clonedPortList = clone(
2622  inLogicalResponse.getConnectedPortListAlias()->getPortList(), mFactory);
2623  newPortListAlias->setPortList(clonedPortList);
2624  logicalResponsePtr->setConnectedPortListAlias(newPortListAlias);
2625  }
2626  if(NULL != inLogicalResponse.getConnectedPortList()) {
2627  PortListSharedPtr clonedPortList = clone(inLogicalResponse.getConnectedPortList(),
2628  mFactory);
2629  logicalResponsePtr->setConnectedPortList(clonedPortList);
2630  }
2631 
2632  LogicElementSharedPtr clonedLogicElem = clone(inLogicalResponse.getLogicWaveForm(),
2633  mFactory);
2634  logicalResponsePtr->setLogicWaveForm(clonedLogicElem);
2635 
2636  mReturnVal = logicalResponsePtr;
2637  } catch(Error& e) {
2638  e.setCurrentLocation(__FUNCTION__, __FILE__, __LINE__);
2639  throw;
2640  }
2641  }
boost::shared_ptr< LogicElement > LogicElementSharedPtr
boost::shared_ptr< _Tp > clone(const boost::shared_ptr< _Tp > &inPointer, const ObjectFactorySharedPtr &inFactory)
Definition: Cloning.hpp:63
boost::shared_ptr< LogicalResponse > LogicalResponseSharedPtr
boost::shared_ptr< PortList > PortListSharedPtr
boost::shared_ptr< PortListAlias > PortListAliasSharedPtr
boost::shared_ptr< Port > PortSharedPtr

+ Here is the call graph for this function:

Field Documentation

Definition at line 2650 of file Cloning.hpp.

Definition at line 2651 of file Cloning.hpp.


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