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

Method Add

lib/queue/action-queue.cpp:102–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100}
101
102void ActionQueue::Add(const std::shared_ptr<MacroAction> &action)
103{
104 std::lock_guard<std::mutex> lock(_mutex);
105 if (_resolveVariablesOnAdd) {
106 auto copy = action->Copy();
107 copy->GetMacro();
108 OBSDataAutoRelease data = obs_data_create();
109 action->Save(data);
110 copy->Load(data);
111 copy->PostLoad();
112 RunAndClearPostLoadSteps();
113 copy->ResolveVariablesToFixedValues();
114 _actions.emplace_back(copy);
115 } else {
116 _actions.emplace_back(action);
117 }
118 _cv.notify_all();
119}
120
121bool ActionQueue::IsEmpty()
122{

Callers 1

signalImportedQueuesFunction · 0.45

Calls 7

RunAndClearPostLoadStepsFunction · 0.50
CopyMethod · 0.45
GetMacroMethod · 0.45
SaveMethod · 0.45
LoadMethod · 0.45
PostLoadMethod · 0.45

Tested by

no test coverage detected