MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / StringVariable

Class StringVariable

lib/variables/variable-string.hpp:12–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10// when reading its value as a std::string
11
12class StringVariable {
13public:
14 EXPORT StringVariable() : _value(""){};
15 EXPORT StringVariable(std::string str) : _value(std::move(str)){};
16 EXPORT StringVariable(const char *str) : _value(str){};
17 EXPORT operator std::string() const;
18 EXPORT operator QVariant() const;
19 EXPORT void operator=(std::string);
20 EXPORT void operator=(const char *value);
21 EXPORT const char *c_str();
22 EXPORT const char *c_str() const;
23 EXPORT bool empty() const;
24
25 EXPORT const std::string &UnresolvedValue() const { return _value; }
26
27 EXPORT void Load(obs_data_t *obj, const char *name);
28 EXPORT void Save(obs_data_t *obj, const char *name) const;
29
30 EXPORT void ResolveVariables();
31
32private:
33 void Resolve() const;
34
35 std::string _value = "";
36 mutable std::string _resolvedValue = "";
37 mutable std::chrono::high_resolution_clock::time_point _lastResolve{};
38};
39
40std::string SubstitueVariables(std::string str);
41

Callers 1

TextChangedMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected