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