~ubuntu-branches/ubuntu/wily/openwalnut/wily-proposed

« back to all changes in this revision

Viewing changes to .pc/gcc5.patch/src/core/kernel/combiner/WModuleOneToOneCombiner.h

  • Committer: Package Import Robot
  • Author(s): Michael Terry
  • Date: 2015-08-12 13:14:55 UTC
  • Revision ID: package-import@ubuntu.com-20150812131455-cwndvoy9wwx34ya2
Tags: 1.4.0~rc1+hg3a3147463ee2-1ubuntu4
* debian/patches/gcc5.patch:
  - Work around incompatibility between boost+gcc5 and Qt4, fixing FTBFS

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
#ifndef WMODULEONETOONECOMBINER_H
 
26
#define WMODULEONETOONECOMBINER_H
 
27
 
 
28
#include <string>
 
29
 
 
30
#include <boost/shared_ptr.hpp>
 
31
 
 
32
#include "../WModule.h"
 
33
#include "../WModuleCombiner.h"
 
34
#include "../WModuleCombinerTypes.h"
 
35
 
 
36
 
 
37
 
 
38
/**
 
39
 * Base class for all combiners which apply one connection between two connectors of two modules.
 
40
 */
 
41
class  WModuleOneToOneCombiner: public WModuleCombiner
 
42
{
 
43
public:
 
44
    /**
 
45
     * Creates a combiner which sets up the specified modules and prototype combination. Specifying a NULL pointer to the srcModule parameter
 
46
     * causes the combiner to only add the target module without any connections. This is especially useful for modules which do not provide any
 
47
     * input which must be connected. It is possible to specify prototypes here. The will get created upon apply.
 
48
     *
 
49
     *
 
50
     * \param target            the target container
 
51
     * \param srcModule         the module whose output should be connected with the prototypes input
 
52
     * \param srcConnector      the output connector of the module
 
53
     * \param targetModule      the module/prototype to use for connecting the module with
 
54
     * \param targetConnector   the input connector of the prototype to connect with srcConnector.
 
55
     */
 
56
    WModuleOneToOneCombiner( boost::shared_ptr< WModuleContainer > target,
 
57
                    boost::shared_ptr< WModule > srcModule, std::string srcConnector,
 
58
                    boost::shared_ptr< WModule > targetModule, std::string targetConnector );
 
59
 
 
60
    /**
 
61
     * Creates a combiner which sets up the specified modules and prototype combination. This constructor automatically uses the kernel's root
 
62
     * container as target container. Specifying a NULL pointer to the srcModule parameter
 
63
     * causes the combiner to only add the target module without any connections. This is especially useful for modules which do not provide any
 
64
     * input which must be connected. It is possible to specify prototypes here. The will get created upon apply.
 
65
     *
 
66
     * \param srcModule         the module whose output should be connected with the prototypes input
 
67
     * \param srcConnector      the output connector of the module
 
68
     * \param targetModule      the module/prototype to use for connecting the module with
 
69
     * \param targetConnector   the input connector of the prototype to connect with srcConnector.
 
70
     */
 
71
    WModuleOneToOneCombiner( boost::shared_ptr< WModule > srcModule, std::string srcConnector,
 
72
                    boost::shared_ptr< WModule > targetModule, std::string targetConnector );
 
73
 
 
74
    /**
 
75
     * Destructor.
 
76
     */
 
77
    virtual ~WModuleOneToOneCombiner();
 
78
 
 
79
    /**
 
80
     * Apply the internal module structure to the target container. Be aware, that this operation might take some time, as modules can be
 
81
     * connected only if they are "ready", which, at least with WMData modules, might take some time. It applies the loaded project file.
 
82
     */
 
83
    virtual void apply() = 0;
 
84
 
 
85
    /**
 
86
     * Gets the source module. This module's output connector is connected with the target.
 
87
     *
 
88
     * \return the source module.
 
89
     */
 
90
    boost::shared_ptr< WModule > getSrcModule() const;
 
91
 
 
92
    /**
 
93
     * The output connector of m_srcModule to connect with m_targetConnector.
 
94
     *
 
95
     * \return the source module's output connector.
 
96
     */
 
97
    std::string getSrcConnector() const;
 
98
 
 
99
    /**
 
100
     * The module/prototype to connect with m_srcModule.
 
101
     *
 
102
     * \return the target module prototype.
 
103
     */
 
104
    boost::shared_ptr< WModule > getTargetModule() const;
 
105
 
 
106
    /**
 
107
     * The input connector the target module to connect with m_srcConnector.
 
108
     *
 
109
     * \return the target module's input connector.
 
110
     */
 
111
    std::string getTargetConnector() const;
 
112
 
 
113
protected:
 
114
    /**
 
115
     * The source module to connect with the target
 
116
     */
 
117
    boost::shared_ptr< WModule > m_srcModule;
 
118
 
 
119
    /**
 
120
     * The output connector of m_srcModule to connect with m_targetConnector.
 
121
     */
 
122
    std::string m_srcConnector;
 
123
 
 
124
    /**
 
125
     * The module/prototype to connect with m_srcMdodule.
 
126
     */
 
127
    boost::shared_ptr< WModule > m_targetModule;
 
128
 
 
129
    /**
 
130
     * The input connector the target module to connect with m_srcConnector.
 
131
     */
 
132
    std::string m_targetConnector;
 
133
 
 
134
private:
 
135
};
 
136
 
 
137
#endif  // WMODULEONETOONECOMBINER_H
 
138
 
 
139