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

Method hasExtension

src/App/ExtensionContainer.cpp:75–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75bool ExtensionContainer::hasExtension(Base::Type type, bool derived) const
76{
77
78 // check for the exact type
79 bool found = _extensions.find(type) != _extensions.end();
80 if (!found && derived) {
81 // and for types derived from it, as they can be cast to the extension
82 for (const auto& entry : _extensions) {
83 if (entry.first.isDerivedFrom(type)) {
84 return true;
85 }
86 }
87 return false;
88 }
89 return found;
90}
91
92bool ExtensionContainer::hasExtension(const std::string& name) const
93{

Callers 15

getParentsMethod · 0.45
getFirstParentMethod · 0.45
resolveMethod · 0.45
recursiveCSSubgraphsMethod · 0.45
addSubgraphsMethod · 0.45
addEdgesMethod · 0.45
getLinkedChildrenMethod · 0.45
flattenSubnameMethod · 0.45
sLoadFileMethod · 0.45
hasObjectMethod · 0.45

Calls 4

findMethod · 0.45
endMethod · 0.45
isDerivedFromMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected