00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifdef HAVE_CONFIG_H
00017 #include "torc/generic/config.h"
00018 #endif //HAVE_CONFIG_H
00019
00020
00021 #include "torc/generic/om/ConnectionHandler.hpp"
00022 #include "torc/generic/om/Net.hpp"
00023
00024 namespace torc {
00025 namespace generic {
00026 void
00027 ConnectionHandler::connectPortToNet(
00028 const PortSharedPtr &inPort ) throw(Error)
00029 try
00030 {
00031 mNet->addConnectedPort( inPort );
00032 }
00033 catch( Error &e )
00034 {
00035 e.setCurrentLocation(
00036 __FUNCTION__, __FILE__, __LINE__ );
00037 throw;
00038 }
00039
00040 void
00041 ConnectionHandler::disconnectPortFromNet(
00042 const PortSharedPtr &inPort ) throw(Error)
00043 try
00044 {
00045 mNet->removeConnectedPort( inPort );
00046 }
00047 catch( Error &e )
00048 {
00049 e.setCurrentLocation(
00050 __FUNCTION__, __FILE__, __LINE__ );
00051 throw;
00052 }
00053
00054
00055 void
00056 ConnectionHandler::connectPortRefToNet(
00057 const PortReferenceSharedPtr &inPortRef ) throw(Error)
00058 try
00059 {
00060 mNet->addConnectedPortReference( inPortRef );
00061 }
00062 catch( Error &e )
00063 {
00064 e.setCurrentLocation(
00065 __FUNCTION__, __FILE__, __LINE__ );
00066 throw;
00067 }
00068
00069
00070 void
00071 ConnectionHandler::disconnectPortRefFromNet(
00072 const PortReferenceSharedPtr &inPortRef ) throw(Error)
00073 try
00074 {
00075 mNet->removeConnectedPortReference( inPortRef );
00076 }
00077 catch( Error &e )
00078 {
00079 e.setCurrentLocation(
00080 __FUNCTION__, __FILE__, __LINE__ );
00081 throw;
00082 }
00083
00084 void
00085 ConnectionHandler::connectPortListToNet(
00086 const PortListSharedPtr &inPortList ) throw(Error)
00087 try
00088 {
00089 mNet->addConnectedPortList( inPortList );
00090 }
00091 catch( Error &e )
00092 {
00093 e.setCurrentLocation(
00094 __FUNCTION__, __FILE__, __LINE__ );
00095 throw;
00096 }
00097
00098
00099 void
00100 ConnectionHandler::disconnectPortListFromNet(
00101 const PortListSharedPtr &inPortList ) throw(Error)
00102 try
00103 {
00104 mNet->removeConnectedPortList( inPortList );
00105 }
00106 catch( Error &e )
00107 {
00108 e.setCurrentLocation(
00109 __FUNCTION__, __FILE__, __LINE__ );
00110 throw;
00111 }
00112
00113 }
00114 }