Loading...
Searching...
No Matches
Interface.hpp
1#pragma once
2#include <score/plugins/UuidKey.hpp>
3
4#include <score_lib_base_export.h>
5
6namespace score
7{
8class InterfaceBase;
9using InterfaceKey = UuidKey<InterfaceBase>;
51class SCORE_LIB_BASE_EXPORT InterfaceBase
52{
53public:
54 virtual ~InterfaceBase();
55
57 virtual InterfaceKey interfaceKey() const noexcept = 0;
58};
59}
60
71#define SCORE_INTERFACE(Type, Uuid) \
72public: \
73 static constexpr score::InterfaceKey static_interfaceKey() noexcept \
74 { \
75 return_uuid(Uuid); \
76 } \
77 \
78 constexpr score::InterfaceKey interfaceKey() const noexcept final override \
79 { \
80 return static_interfaceKey(); \
81 } \
82 \
83 using ConcreteKey = UuidKey<Type>; \
84 virtual ConcreteKey concreteKey() const noexcept = 0; \
85 \
86private:
87
95#define SCORE_CONCRETE(Uuid) \
96public: \
97 static constexpr ConcreteKey static_concreteKey() noexcept \
98 { \
99 return_uuid(Uuid); \
100 } \
101 \
102 constexpr ConcreteKey concreteKey() const noexcept final override \
103 { \
104 return static_concreteKey(); \
105 } \
106 \
107private:
Definition UuidKey.hpp:343
Base class for plug-in interfaces.
Definition Interface.hpp:52
virtual InterfaceKey interfaceKey() const noexcept=0
Identifies an interface uniquely.
Base toolkit upon which the software is built.
Definition Application.cpp:90