MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / GetFloatMap

Method GetFloatMap

src/Base/Parameter.cpp:995–1018  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

993}
994
995std::vector<std::pair<std::string, double>> ParameterGrp::GetFloatMap(const char* sFilter) const
996{
997 std::vector<std::pair<std::string, double>> vrValues;
998 if (!_pGroupNode) {
999 return vrValues;
1000 }
1001
1002 std::string Name;
1003
1004 DOMElement* pcTemp = FindElement(_pGroupNode, "FCFloat");
1005 while (pcTemp) {
1006 Name = StrX(pcTemp->getAttribute(XStrLiteral("Name").unicodeForm())).c_str();
1007 // check on filter condition
1008 if (!sFilter || Name.find(sFilter) != std::string::npos) {
1009 vrValues.emplace_back(
1010 Name,
1011 (atof(StrX(pcTemp->getAttribute(XStrLiteral("Value").unicodeForm())).c_str()))
1012 );
1013 }
1014 pcTemp = FindNextElement(pcTemp, "FCFloat");
1015 }
1016
1017 return vrValues;
1018}
1019
1020
1021void ParameterGrp::SetASCII(const char* Name, const char* sValue)

Callers 8

getFloatsMethod · 0.80
getContentsMethod · 0.80
revertMethod · 0.80
copyTemplateParametersFunction · 0.80
onGroupSelectedMethod · 0.80
onCreateFloatItemMethod · 0.80
matchesMethod · 0.80
TEST_FFunction · 0.80

Calls 5

StrXClass · 0.85
unicodeFormMethod · 0.80
c_strMethod · 0.45
getAttributeMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected