MCPcopy Create free account
hub / github.com/Audio4Linux/JDSP4Linux / loadDefaults

Method loadDefaults

src/data/EelParser.cpp:119–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

117}
118
119bool EELParser::loadDefaults()
120{
121 if (!isFileLoaded())
122 {
123 return false;
124 }
125
126 for(const auto& prop : std::as_const(properties))
127 {
128 if(prop->getType() == EELPropertyType::NumberRange)
129 {
130 auto* nr = dynamic_cast<EELNumberRangeProperty<float>*>(prop);
131 nr->setValue(nr->getDefault());
132 manipulateProperty(prop);
133 }
134 else if (prop->getType() == EELPropertyType::List) {
135 auto* list = dynamic_cast<EELListProperty*>(prop);
136 list->setValue(list->getDefault());
137 manipulateProperty(prop);
138 }
139 }
140 return true;
141}
142
143bool EELParser::hasDefaultsDefined()
144{

Callers 1

onResetLiveprogParamsMethod · 0.80

Calls 3

getDefaultMethod · 0.80
getTypeMethod · 0.45
setValueMethod · 0.45

Tested by

no test coverage detected