@@ -105,93 +105,83 @@ namespace Networks {
105105 virtual ~Module () override ;
106106
107107 /* ** User-interface ****/
108- virtual ModuleStateHandle get_state () override final ;
109- virtual const ModuleStateHandle get_state () const override final ;
110- virtual void enqueueExecuteAgain (bool upstream) override final ;
111- virtual void error (const std::string& msg) const override final ;
112- virtual void warning (const std::string& msg) const override final { getLogger ()->warning (msg); }
113- virtual void remark (const std::string& msg) const override final { getLogger ()->remark (msg); }
114- virtual void status (const std::string& msg) const override final { getLogger ()->status (msg); }
115- virtual bool needToExecute () const override final ;
116-
117- /* ** Dev-interface ****/
118- virtual boost::signals2::connection connectExecuteSelfRequest (const ExecutionSelfRequestSignalType::slot_type& subscriber) override final ;
119- virtual void set_state (ModuleStateHandle state) override final ;
120- virtual ModuleExecutionState& executionState () override final ;
108+ ModuleStateHandle get_state () override final ;
109+ const ModuleStateHandle get_state () const override final ;
110+ void enqueueExecuteAgain (bool upstream) override final ;
111+ void error (const std::string& msg) const override final ;
112+ void warning (const std::string& msg) const override final { getLogger ()->warning (msg); }
113+ void remark (const std::string& msg) const override final { getLogger ()->remark (msg); }
114+ void status (const std::string& msg) const override final { getLogger ()->status (msg); }
115+ bool needToExecute () const override final ;
116+ bool hasDynamicPorts () const override ;
117+ template <class T , class D , size_t N>
118+ void sendOutput (const StaticPortName<T,N>& port, boost::shared_ptr<D> data);
119+
120+ /* ** public Dev-interface ****/
121+ boost::signals2::connection connectExecuteSelfRequest (const ExecutionSelfRequestSignalType::slot_type& subscriber) override final ;
122+ void set_state (ModuleStateHandle state) override final ;
123+ ModuleExecutionState& executionState () override final ;
124+
121125 virtual std::string helpPageUrl () const override ;
122126 std::string newHelpPageUrl () const ; // location in flux, but new v5 modules only have one of these
123127 // for serialization
124- virtual const ModuleLookupInfo& get_info () const override final { return info_; }
125- virtual void set_id (const std::string& id) override final ;
126- virtual bool executeWithSignals () NOEXCEPT override final ;
128+ const ModuleLookupInfo& get_info () const override final { return info_; }
129+ void set_id (const std::string& id) override final ;
130+ bool executeWithSignals () NOEXCEPT override final ;
127131 bool has_ui () const override ;
128132 void setUiVisible (bool visible) override ;
129- virtual size_t num_input_ports () const override final ;
130- virtual size_t num_output_ports () const override final ;
133+ size_t num_input_ports () const override final ;
134+ size_t num_output_ports () const override final ;
131135 // override this for modules that changed packages, to point to correct wiki page
132136 virtual std::string legacyPackageName () const override { return get_packagename (); }
133137 // override this for modules that changed names, to point to correct wiki page
134138 virtual std::string legacyModuleName () const override { return get_module_name (); }
135- virtual bool hasInputPort (const PortId& id) const override final ;
136- virtual bool hasOutputPort (const PortId& id) const override final ;
137- virtual InputPortHandle getInputPort (const PortId& id) override final ;
138- virtual OutputPortHandle getOutputPort (const PortId& id) const override final ;
139- virtual std::vector<InputPortHandle> findInputPortsWithName (const std::string& name) const override final ;
140- virtual std::vector<OutputPortHandle> findOutputPortsWithName (const std::string& name) const override final ;
141- virtual std::vector<InputPortHandle> inputPorts () const override final ;
142- virtual std::vector<OutputPortHandle> outputPorts () const override final ;
143- virtual bool isStoppable () const override final ;
144- virtual bool hasDynamicPorts () const override ;
139+ bool hasInputPort (const PortId& id) const override final ;
140+ bool hasOutputPort (const PortId& id) const override final ;
141+ InputPortHandle getInputPort (const PortId& id) override final ;
142+ OutputPortHandle getOutputPort (const PortId& id) const override final ;
143+ std::vector<InputPortHandle> findInputPortsWithName (const std::string& name) const override final ;
144+ std::vector<OutputPortHandle> findOutputPortsWithName (const std::string& name) const override final ;
145+ std::vector<InputPortHandle> inputPorts () const override final ;
146+ std::vector<OutputPortHandle> outputPorts () const override final ;
147+ bool isStoppable () const override final ;
145148 bool oport_connected (const PortId& id) const ;
146149 bool inputsChanged () const ;
147- virtual std::string get_module_name () const override final { return info_.module_name_ ; }
150+ std::string get_module_name () const override final { return info_.module_name_ ; }
148151 std::string get_categoryname () const { return info_.category_name_ ; }
149152 std::string get_packagename () const { return info_.package_name_ ; }
150153 ModuleId get_id () const override { return id_; }
151-
152- virtual ModuleReexecutionStrategyHandle getReexecutionStrategy () const override final ;
153- virtual void setReexecutionStrategy (ModuleReexecutionStrategyHandle caching) override final ;
154- virtual Core::Algorithms::AlgorithmStatusReporter::UpdaterFunc getUpdaterFunc () const override final ;
155- virtual void setUpdaterFunc (Core::Algorithms::AlgorithmStatusReporter::UpdaterFunc func) override final ;
156- virtual void setUiToggleFunc (UiToggleFunc func) override final ;
157-
158- virtual boost::signals2::connection connectExecuteBegins (const ExecuteBeginsSignalType::slot_type& subscriber) override final ;
159- virtual boost::signals2::connection connectExecuteEnds (const ExecuteEndsSignalType::slot_type& subscriber) override final ;
160- virtual boost::signals2::connection connectErrorListener (const ErrorSignalType::slot_type& subscriber) override final ;
161-
162- virtual void addPortConnection (const boost::signals2::connection& con) override final ;
163-
164- virtual Core::Algorithms::AlgorithmHandle getAlgorithm () const override final ;
165- virtual void setLogger (Core::Logging::LoggerHandle log) override final ;
166- virtual Core::Logging::LoggerHandle getLogger () const override final ;
167- virtual const MetadataMap& metadata () const override final ;
168- virtual bool executionDisabled () const override final ;
169- virtual void setExecutionDisabled (bool disable) override final ;
170-
171- template <class T , class D , size_t N>
172- void sendOutput (const StaticPortName<T,N>& port, boost::shared_ptr<D> data);
173-
154+ ModuleReexecutionStrategyHandle getReexecutionStrategy () const override final ;
155+ void setReexecutionStrategy (ModuleReexecutionStrategyHandle caching) override final ;
156+ Core::Algorithms::AlgorithmStatusReporter::UpdaterFunc getUpdaterFunc () const override final ;
157+ void setUpdaterFunc (Core::Algorithms::AlgorithmStatusReporter::UpdaterFunc func) override final ;
158+ void setUiToggleFunc (UiToggleFunc func) override final ;
159+ boost::signals2::connection connectExecuteBegins (const ExecuteBeginsSignalType::slot_type& subscriber) override final ;
160+ boost::signals2::connection connectExecuteEnds (const ExecuteEndsSignalType::slot_type& subscriber) override final ;
161+ boost::signals2::connection connectErrorListener (const ErrorSignalType::slot_type& subscriber) override final ;
162+ void addPortConnection (const boost::signals2::connection& con) override final ;
163+ Core::Algorithms::AlgorithmHandle getAlgorithm () const override final ;
164+ void setLogger (Core::Logging::LoggerHandle log) override final ;
165+ Core::Logging::LoggerHandle getLogger () const override final ;
166+ const MetadataMap& metadata () const override final ;
167+ bool executionDisabled () const override final ;
168+ void setExecutionDisabled (bool disable) override final ;
174169 static const int TraitFlags;
175- /* ******/
176-
177170 // for unit testing. Need to restrict access somehow.
178171 static void resetIdGenerator ();
172+ /* ******/
179173
180174 protected:
181175/* ** User-interface ****/
182176 // Throws if input is not present or null.
183177 template <class T , size_t N>
184178 boost::shared_ptr<T> getRequiredInput (const StaticPortName<T,N>& port);
185-
186179 template <class T , size_t N>
187180 boost::optional<boost::shared_ptr<T>> getOptionalInput (const StaticPortName<T,N>& port);
188-
189181 template <class T , size_t N>
190182 std::vector<boost::shared_ptr<T>> getRequiredDynamicInputs (const DynamicPortName<T,N>& port);
191-
192183 template <class T , size_t N>
193184 std::vector<boost::shared_ptr<T>> getOptionalDynamicInputs (const DynamicPortName<T,N>& port);
194-
195185 template <class T , size_t N>
196186 void sendOutputFromAlgorithm (const StaticPortName<T,N>& port, const Core::Algorithms::AlgorithmOutput& output);
197187
@@ -212,7 +202,7 @@ namespace Networks {
212202 // For modules that need to initialize some internal state signal/slots, this needs to be called after set_state to reinitialize.
213203 virtual void postStateChangeInternalSignalHookup () {}
214204
215- /* ** Dev-interface ****/
205+ /* ** protected Dev-interface ****/
216206 virtual void send_output_handle (const PortId& id, Core::Datatypes::DatatypeHandle data) override final ;
217207 virtual size_t add_input_port (InputPortHandle);
218208 size_t add_output_port (OutputPortHandle);
0 commit comments