OpenWalnut
1.4.0
|
00001 //--------------------------------------------------------------------------- 00002 // 00003 // Project: OpenWalnut ( http://www.openwalnut.org ) 00004 // 00005 // Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS 00006 // For more information see http://www.openwalnut.org/copying 00007 // 00008 // This file is part of OpenWalnut. 00009 // 00010 // OpenWalnut is free software: you can redistribute it and/or modify 00011 // it under the terms of the GNU Lesser General Public License as published by 00012 // the Free Software Foundation, either version 3 of the License, or 00013 // (at your option) any later version. 00014 // 00015 // OpenWalnut is distributed in the hope that it will be useful, 00016 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 // GNU Lesser General Public License for more details. 00019 // 00020 // You should have received a copy of the GNU Lesser General Public License 00021 // along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>. 00022 // 00023 //--------------------------------------------------------------------------- 00024 00025 #ifndef WDISCONNECTCOMBINER_H 00026 #define WDISCONNECTCOMBINER_H 00027 00028 #include <list> 00029 #include <map> 00030 #include <string> 00031 #include <utility> 00032 00033 #include <boost/shared_ptr.hpp> 00034 00035 #include "../WModule.h" 00036 #include "../WModuleCombinerTypes.h" 00037 #include "WModuleOneToOneCombiner.h" 00038 00039 #include "../WModuleConnector.h" 00040 00041 00042 00043 /** 00044 * Combiner which disconnects the specified connection. 00045 */ 00046 class WDisconnectCombiner: public WModuleOneToOneCombiner 00047 { 00048 public: 00049 /** 00050 * Creates a combiner which disconnects the specified connection. If the specified connection does not exist (anymore), nothing will happen. 00051 * 00052 * \param target the target container 00053 * \param srcModule the module whose connector should be disconnected 00054 * \param srcConnector the srcModule connector to disconnect 00055 * \param targetModule the module whose connector should be disconnected from srcConnector 00056 * \param targetConnector the targetModule connector to disconnect. 00057 */ 00058 WDisconnectCombiner( boost::shared_ptr< WModuleContainer > target, 00059 boost::shared_ptr< WModule > srcModule, std::string srcConnector, 00060 boost::shared_ptr< WModule > targetModule, std::string targetConnector ); 00061 00062 /** 00063 * Creates a combiner which disconnects the specified connection. If the specified connection does not exist (anymore), nothing will happen. 00064 * 00065 * \param srcModule the module whose connector should be disconnected 00066 * \param srcConnector the srcModule connector to disconnect 00067 * \param targetModule the module whose connector should be disconnected from srcConnector 00068 * \param targetConnector the targetModule connector to disconnect. 00069 */ 00070 WDisconnectCombiner( boost::shared_ptr< WModule > srcModule, std::string srcConnector, 00071 boost::shared_ptr< WModule > targetModule, std::string targetConnector ); 00072 00073 /** 00074 * Creates a combiner which disconnects the specified connection. If the specified connection does not exist (anymore), nothing will happen. 00075 * 00076 * \param srcConnector connector 1 00077 * \param targetConnector connector 2 00078 */ 00079 WDisconnectCombiner( boost::shared_ptr< WModuleConnector > srcConnector, 00080 boost::shared_ptr< WModuleConnector > targetConnector ); 00081 00082 /** 00083 * Destructor. 00084 */ 00085 virtual ~WDisconnectCombiner(); 00086 00087 /** 00088 * Disconnects the specified connection. 00089 */ 00090 virtual void apply(); 00091 00092 protected: 00093 private: 00094 }; 00095 00096 #endif // WDISCONNECTCOMBINER_H 00097