00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #include "torc/generic/om/PortListAlias.hpp"
00017 #include "torc/generic/om/Simulate.hpp"
00018
00019 namespace torc {
00020
00021 namespace generic {
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033 PortListAliasSharedPtr
00034 PortListAlias::Factory::newPortListAliasPtr( const std::string & inName,
00035 const PortListSharedPtr & inPortList,
00036 const SimulateSharedPtr & inSimulate ) throw(Error) {
00037 try
00038 {
00039 PortListAliasSharedPtr newPortListAlias;
00040 create( newPortListAlias );
00041 newPortListAlias->setName( inName );
00042 newPortListAlias->setPortList( inPortList );
00043 if( inSimulate )
00044 {
00045 inSimulate->addPortListAlias( newPortListAlias );
00046 }
00047 return newPortListAlias;
00048 }
00049 catch( Error &e )
00050 {
00051 e.setCurrentLocation(
00052 __FUNCTION__, __FILE__, __LINE__ );
00053 throw;
00054 }
00055 }
00056
00057 PortListAlias::PortListAlias()
00058 : Nameable(),
00059 SelfReferencing<PortListAlias>(),
00060 mPortList() {
00061 }
00062
00063 void
00064 PortListAlias::accept(BaseVisitor & inoutVisitor) throw(Error) {
00065 try
00066 {
00067 runVisitor( *this, inoutVisitor );
00068 }
00069 catch( Error &e )
00070 {
00071 e.setCurrentLocation(
00072 __FUNCTION__, __FILE__, __LINE__ );
00073 throw;
00074 }
00075 }
00076
00077 void
00078 PortListAlias::setPortList( const PortListSharedPtr & inPortList ) throw() {
00079 mPortList = inPortList;
00080 }
00081
00082 PortListAlias::~PortListAlias() throw() {
00083 }
00084
00085 }
00086
00087 }