~ubuntu-branches/ubuntu/raring/openwalnut/raring

« back to all changes in this revision

Viewing changes to src/core/kernel/combiner/WApplyCombiner.h

  • Committer: Package Import Robot
  • Author(s): Sebastian Eichelbaum
  • Date: 2012-12-12 11:26:32 UTC
  • mfrom: (3.1.1 sid)
  • Revision ID: package-import@ubuntu.com-20121212112632-xhiuwkxuz5h0idkh
Tags: 1.3.1+hg5849-1
* Minor changes compared to 1.3.0 but included several bug fixes.
* See http://www.openwalnut.org/versions/4

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
#include "../WModuleInputConnector.h"
40
40
#include "../WModuleOutputConnector.h"
41
41
 
42
 
#include "../WExportKernel.h"
 
42
 
43
43
/**
44
44
 * Base class for all combiners which apply one connection between two connectors of two modules.
45
45
 */
46
 
class OWKERNEL_EXPORT WApplyCombiner: public WModuleOneToOneCombiner
 
46
class  WApplyCombiner: public WModuleOneToOneCombiner
47
47
{
48
48
public:
49
 
 
50
49
    /**
51
50
     * Creates a combiner which sets up the specified modules and prototype combination. Specifying a NULL pointer to the srcModule parameter
52
51
     * causes the combiner to only add the target module without any connections. This is especially useful for modules which do not provide any
60
59
     * \param targetConnector   the input connector of the prototype to connect with srcConnector.
61
60
     */
62
61
    WApplyCombiner( boost::shared_ptr< WModuleContainer > target,
63
 
                    boost::shared_ptr< WModule > srcModule, std::string srcConnector,
64
 
                    boost::shared_ptr< WModule > targetModule, std::string targetConnector );
 
62
                    WModule::SPtr srcModule, std::string srcConnector,
 
63
                    WModule::SPtr targetModule, std::string targetConnector );
65
64
 
66
65
    /**
67
66
     * Creates a combiner which sets up the specified modules and prototype combination. This constructor automatically uses the kernel's root
74
73
     * \param targetModule      the module/prototype to use for connecting the module with
75
74
     * \param targetConnector   the input connector of the prototype to connect with srcConnector.
76
75
     */
77
 
    WApplyCombiner( boost::shared_ptr< WModule > srcModule, std::string srcConnector,
78
 
                    boost::shared_ptr< WModule > targetModule, std::string targetConnector );
 
76
    WApplyCombiner( WModule::SPtr srcModule, std::string srcConnector,
 
77
                    WModule::SPtr targetModule, std::string targetConnector );
 
78
 
 
79
    /**
 
80
     * Creates a combiner which only adds the given module. This constructor automatically uses the kernel's root
 
81
     * container as target container. Specifying a NULL pointer to the srcModule parameter
 
82
     * causes the combiner to only add the target module without any connections. This is especially useful for modules which do not provide any
 
83
     * input which must be connected. It is possible to specify prototypes here. The will get created upon apply.
 
84
     *
 
85
     * \param module the module to add
 
86
     */
 
87
    explicit WApplyCombiner( WModule::SPtr module );
79
88
 
80
89
    /**
81
90
     * Destructor.
89
98
    virtual void apply();
90
99
 
91
100
    /**
92
 
     * This method creates a list of possible combiners for connections between the specified modules. Both modules can be prototypes.
 
101
     * This method creates a list of possible combiners for connections between the specified modules. Both modules can be prototypes. This
 
102
     * method lists only connections from module1's outputs to module2's inputs.
93
103
     *
94
104
     * \param module1 the first module
95
105
     * \param module2 the second module
97
107
     * \return the list of combiner for one-to-one connections
98
108
     */
99
109
    template < typename T >
100
 
    static WCombinerTypes::WOneToOneCombiners createCombinerList( boost::shared_ptr< WModule > module1, boost::shared_ptr< WModule > module2 )
 
110
    static WCombinerTypes::WOneToOneCombiners createCombinerList( WModule::SPtr module1, WModule::SPtr module2 )
101
111
    {
102
112
        // this list contains all connections for the current module with the other one
103
113
        WCombinerTypes::WOneToOneCombiners lComp;
137
147
    }
138
148
 
139
149
protected:
140
 
 
141
150
private:
142
151
};
143
152