AuboStudio SDK 0.6.3

contribution_provider.h
浏览该文件的文档.
1 #ifndef AUBO_SCOPE_CONTRIBUTION_PROVIDER_H
2 #define AUBO_SCOPE_CONTRIBUTION_PROVIDER_H
3
4 #include <memory>
5 #include <aubo_caps/contribution/program/program_node_contribution.h>
6
7 namespace arcs {
8 namespace aubo_scope {
9
10 /**
11 * This interfaces provides access to a contribution/
12 * <p>
13 * NOTE: This interface is not relevant for contributions with a HTML-based user
14 * interface.
15 * </p>
16 *
17 * @tparam <T> the (generic) type parameter for the interface representing the
18 * type of contribution the interface provides access to
19 */
20 template <class T>
21 class ContributionProvider
22 {
23 public:
24 virtual ~ContributionProvider() = default;
25
26 /**
27 * Gets a contribution/ Call this as the result of a user action to get the
28 * currently selected node.
29 *
30 * @return the relevant contribution
31 */
32 virtual T *get() = 0;
33 };
34
35 template <class T>
36 using ContributionProviderPtr = std::shared_ptr<ContributionProvider<T>>;
37
38 } // namespace aubo_scope
39 } // namespace arcs
40
41 #endif // AUBO_SCOPE_CONTRIBUTION_PROVIDER_H
arcs::aubo_scope::ContributionProvider
This interfaces provides access to a contribution/
Definition: contribution_provider.h:22
arcs::aubo_scope::ContributionProvider::~ContributionProvider
virtual ~ContributionProvider()=default
arcs::aubo_scope::ContributionProvider::get
virtual T * get()=0
Gets a contribution/ Call this as the result of a user action to get the currently selected node.
arcs::aubo_scope::ContributionProviderPtr
std::shared_ptr< ContributionProvider< T > > ContributionProviderPtr
Definition: contribution_provider.h:36
arcs
Definition: contribution_provider.h:7
program_node_contribution.h