AuboCaps  0.6.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>
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>
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
std::shared_ptr< ContributionProvider< T >> ContributionProviderPtr
This interfaces provides access to a contribution/.