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

Method GetType

lib/utils/temp-variable.cpp:189–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

187}
188
189TempVariableRef::SegmentType TempVariableRef::GetType() const
190{
191 auto segment = _segment.lock();
192 if (!segment) {
193 return SegmentType::NONE;
194 }
195 auto macro = segment->GetMacro();
196 if (!macro) {
197 return SegmentType::NONE;
198 }
199
200 if (std::find(macro->Conditions().begin(), macro->Conditions().end(),
201 segment) != macro->Conditions().end()) {
202 return SegmentType::CONDITION;
203 }
204 if (std::find(macro->Actions().begin(), macro->Actions().end(),
205 segment) != macro->Actions().end()) {
206 return SegmentType::ACTION;
207 }
208 if (std::find(macro->ElseActions().begin(), macro->ElseActions().end(),
209 segment) != macro->ElseActions().end()) {
210 return SegmentType::ELSEACTION;
211 }
212 return SegmentType::NONE;
213}
214
215int TempVariableRef::GetIdx() const
216{

Callers 5

CloseAllInputDialogsFunction · 0.45
HighlightSelectionMethod · 0.45
SetSceneMethod · 0.45
SetSourceMethod · 0.45

Calls 3

GetMacroMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected