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>
6
7namespace arcs {
8namespace 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 */
20template <class T>
22{
23public:
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
35template <class T>
36using ContributionProviderPtr = std::shared_ptr<ContributionProvider<T>>;
37
38} // namespace aubo_scope
39} // namespace arcs
40
41#endif // AUBO_SCOPE_CONTRIBUTION_PROVIDER_H
This interfaces provides access to a contribution/
virtual T * get()=0
Gets a contribution/ Call this as the result of a user action to get the currently selected node.
std::shared_ptr< ContributionProvider< T > > ContributionProviderPtr