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

Method GetIntMap

src/Base/Parameter.cpp:842–865  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

840}
841
842std::vector<std::pair<std::string, long>> ParameterGrp::GetIntMap(const char* sFilter) const
843{
844 std::vector<std::pair<std::string, long>> vrValues;
845 if (!_pGroupNode) {
846 return vrValues;
847 }
848
849 std::string Name;
850
851 DOMElement* pcTemp = FindElement(_pGroupNode, "FCInt");
852 while (pcTemp) {
853 Name = StrX(pcTemp->getAttribute(XStrLiteral("Name").unicodeForm())).c_str();
854 // check on filter condition
855 if (!sFilter || Name.find(sFilter) != std::string::npos) {
856 vrValues.emplace_back(
857 Name,
858 (atol(StrX(pcTemp->getAttribute(XStrLiteral("Value").unicodeForm())).c_str()))
859 );
860 }
861 pcTemp = FindNextElement(pcTemp, "FCInt");
862 }
863
864 return vrValues;
865}
866
867unsigned long ParameterGrp::GetUnsigned(const char* Name, unsigned long lPreset) const
868{

Callers 11

initConfigMethod · 0.80
getIntsMethod · 0.80
getContentsMethod · 0.80
revertMethod · 0.80
saveStateMethod · 0.80
copyTemplateParametersFunction · 0.80
ShortcutManagerMethod · 0.80
onGroupSelectedMethod · 0.80
onCreateIntItemMethod · 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