OpenWalnut
1.2.5
|
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 #include "../WExportKernel.h" 00042 00043 /** 00044 * Combiner which disconnects the specified connection. 00045 */ 00046 class OWKERNEL_EXPORT WDisconnectCombiner: public WModuleOneToOneCombiner 00047 { 00048 public: 00049 00050 /** 00051 * Creates a combiner which disconnects the specified connection. If the specified connection does not exist (anymore), nothing will happen. 00052 * 00053 * \param target the target container 00054 * \param srcModule the module whose connector should be disconnected 00055 * \param srcConnector the srcModule connector to disconnect 00056 * \param targetModule the module whose connector should be disconnected from srcConnector 00057 * \param targetConnector the targetModule connector to disconnect. 00058 */ 00059 WDisconnectCombiner( boost::shared_ptr< WModuleContainer > target, 00060 boost::shared_ptr< WModule > srcModule, std::string srcConnector, 00061 boost::shared_ptr< WModule > targetModule, std::string targetConnector ); 00062 00063 /** 00064 * Creates a combiner which disconnects the specified connection. If the specified connection does not exist (anymore), nothing will happen. 00065 * 00066 * \param srcModule the module whose connector should be disconnected 00067 * \param srcConnector the srcModule connector to disconnect 00068 * \param targetModule the module whose connector should be disconnected from srcConnector 00069 * \param targetConnector the targetModule connector to disconnect. 00070 */ 00071 WDisconnectCombiner( boost::shared_ptr< WModule > srcModule, std::string srcConnector, 00072 boost::shared_ptr< WModule > targetModule, std::string targetConnector ); 00073 00074 /** 00075 * Creates a combiner which disconnects the specified connection. If the specified connection does not exist (anymore), nothing will happen. 00076 * 00077 * \param srcConnector connector 1 00078 * \param targetConnector connector 2 00079 */ 00080 WDisconnectCombiner( boost::shared_ptr< WModuleConnector > srcConnector, 00081 boost::shared_ptr< WModuleConnector > targetConnector ); 00082 00083 /** 00084 * Destructor. 00085 */ 00086 virtual ~WDisconnectCombiner(); 00087 00088 /** 00089 * Disconnects the specified connection. 00090 */ 00091 virtual void apply(); 00092 00093 protected: 00094 00095 private: 00096 }; 00097 00098 #endif // WDISCONNECTCOMBINER_H 00099