OpenWalnut  1.5.0dev
WModuleOneToOneCombiner.cpp
1 //---------------------------------------------------------------------------
2 //
3 // Project: OpenWalnut ( http://www.openwalnut.org )
4 //
5 // Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6 // For more information see http://www.openwalnut.org/copying
7 //
8 // This file is part of OpenWalnut.
9 //
10 // OpenWalnut is free software: you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // OpenWalnut is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public License
21 // along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
22 //
23 //---------------------------------------------------------------------------
24 
25 #include <memory>
26 #include <string>
27 
28 #include "WModuleOneToOneCombiner.h"
29 
30 WModuleOneToOneCombiner::WModuleOneToOneCombiner( std::shared_ptr< WModuleContainer > target,
31  std::shared_ptr< WModule > srcModule, std::string srcConnector,
32  std::shared_ptr< WModule > prototype, std::string targetConnector ):
33  WModuleCombiner( target ),
34  m_srcModule( srcModule ),
35  m_srcConnector( srcConnector ),
36  m_targetModule( prototype ),
37  m_targetConnector( targetConnector )
38 {
39 }
40 
41 WModuleOneToOneCombiner::WModuleOneToOneCombiner( std::shared_ptr< WModule > srcModule, std::string srcConnector,
42  std::shared_ptr< WModule > prototype, std::string targetConnector ):
44  m_srcModule( srcModule ),
45  m_srcConnector( srcConnector ),
46  m_targetModule( prototype ),
47  m_targetConnector( targetConnector )
48 {
49 }
50 
52 {
53  // cleanup
54 }
55 
56 std::shared_ptr< WModule > WModuleOneToOneCombiner::getSrcModule() const
57 {
58  return m_srcModule;
59 }
60 
62 {
63  return m_srcConnector;
64 }
65 
66 std::shared_ptr< WModule > WModuleOneToOneCombiner::getTargetModule() const
67 {
68  return m_targetModule;
69 }
70 
72 {
73  return m_targetConnector;
74 }
75 
This is a base class for all module combination classes.
std::shared_ptr< WModule > getSrcModule() const
Gets the source module.
WModuleOneToOneCombiner(std::shared_ptr< WModuleContainer > target, std::shared_ptr< WModule > srcModule, std::string srcConnector, std::shared_ptr< WModule > targetModule, std::string targetConnector)
Creates a combiner which sets up the specified modules and prototype combination.
std::shared_ptr< WModule > m_srcModule
The source module to connect with the target.
std::string getTargetConnector() const
The input connector the target module to connect with m_srcConnector.
virtual ~WModuleOneToOneCombiner()
Destructor.
std::string m_targetConnector
The input connector the target module to connect with m_srcConnector.
std::string m_srcConnector
The output connector of m_srcModule to connect with m_targetConnector.
std::shared_ptr< WModule > getTargetModule() const
The module/prototype to connect with m_srcModule.
std::string getSrcConnector() const
The output connector of m_srcModule to connect with m_targetConnector.
std::shared_ptr< WModule > m_targetModule
The module/prototype to connect with m_srcMdodule.