fw4spl
IExecutable.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2015.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #ifndef __FWRUNTIME_IEXECUTABLE_HPP__
8 #define __FWRUNTIME_IEXECUTABLE_HPP__
9 
10 #include <string>
11 
12 #include "fwRuntime/config.hpp"
13 #include "fwRuntime/utils/GenericExecutableFactoryRegistrar.hpp"
14 
15 
16 
17 namespace fwRuntime
18 {
19 
20 
21 #define REGISTER_EXECUTABLE( type, id ) static ::fwRuntime::utils::GenericExecutableFactoryRegistrar< type > registrar( \
22  id );
23 
24 
25 
26 struct Bundle;
27 struct ConfigurationElement;
28 struct Runtime;
29 
30 
41 struct FWRUNTIME_CLASS_API IExecutable
42 {
43  friend struct Runtime;
44 
45 
49  FWRUNTIME_API virtual ~IExecutable();
50 
51 
57  virtual std::shared_ptr<Bundle> getBundle() const noexcept = 0;
58 
66  virtual void setInitializationData( const std::shared_ptr<ConfigurationElement> configuration ) noexcept = 0;
67 
68 
69  protected:
70 
76  virtual void setBundle( std::shared_ptr< Bundle > bundle ) = 0;
77 
78 };
79 
80 
81 
82 } // namespace fwRuntime
83 
84 
85 
86 #endif // __FWRUNTIME_IEXECUTABLE_HPP__
Defines the runtime class.
Definition: Runtime.hpp:37
Defines the base executable interface.An executable object is an instance created by an extension poi...
Definition: IExecutable.hpp:41
The namespace fwRuntime contains classes to manage bundle, configuration element, extension point in ...