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

Method ToString

lib/utils/source-selection.cpp:96–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96std::string SourceSelection::ToString(bool resolve) const
97{
98 switch (_type) {
99 case Type::SOURCE:
100 return GetWeakSourceName(_source);
101 case Type::VARIABLE: {
102 auto var = _variable.lock();
103 if (!var) {
104 return "";
105 }
106 if (resolve) {
107 return var->Name() + "[" + var->Value() + "]";
108 }
109 return var->Name();
110 }
111 default:
112 break;
113 }
114 return "";
115}
116
117bool SourceSelection::operator==(const SourceSelection &other) const
118{

Callers 1

SetSourceMethod · 0.45

Calls 3

GetWeakSourceNameFunction · 0.85
NameMethod · 0.45
ValueMethod · 0.45

Tested by

no test coverage detected