We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c7cac6 commit 1c3aa07Copy full SHA for 1c3aa07
1 file changed
include/ppplugin/plugin.h
@@ -57,6 +57,17 @@ class GenericPlugin {
57
template <typename ReturnValue, typename... Args>
58
[[nodiscard]] CallResult<ReturnValue> call(const std::string& function_name, Args&&... args);
59
60
+ template <typename VariableType>
61
+ CallResult<VariableType> global(const std::string& variable_name)
62
+ {
63
+ return plugin_.global(variable_name);
64
+ }
65
66
+ void global(const std::string& variable_name, VariableType&& new_value)
67
68
+ plugin_.global(variable_name, std::forward<VariableType>(new_value));
69
70
+
71
template <typename P>
72
std::optional<std::reference_wrapper<P>> plugin();
73
0 commit comments