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

Method getAttribute

src/Base/Reader.cpp:136–144  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134template<typename T>
135 requires Base::XMLReader::instantiated<T>
136T Base::XMLReader::getAttribute(const char* AttrName, T defaultValue) const
137{
138 auto pos = AttrMap.find(AttrName);
139 if (pos == AttrMap.end()) {
140 return defaultValue;
141 }
142 const char* rawValue = pos->second.c_str();
143 return readerCast<T>(rawValue);
144}
145
146template<typename T>
147 requires Base::XMLReader::instantiated<T>

Callers 15

getCustomAttributesMethod · 0.45
loadFromInputSourceMethod · 0.45
ContactMethod · 0.45
LicenseMethod · 0.45
UrlMethod · 0.45
DependencyMethod · 0.45
SMESH_Algo.cppFile · 0.45
GetAttributeMethod · 0.45
GetAttributeMapMethod · 0.45
_SetAttributeMethod · 0.45
GetBoolMethod · 0.45
GetBoolsMethod · 0.45

Calls 3

findMethod · 0.45
endMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected