MCPcopy Create free account
hub / github.com/christophhart/HISE / createNode

Method createNode

hi_scripting/scripting/scriptnode/api/DspNetwork.cpp:1687–1721  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1685}
1686
1687scriptnode::NodeBase* NodeFactory::createNode(ValueTree data, bool createPolyIfAvailable) const
1688{
1689 auto path = data[PropertyIds::FactoryPath].toString();
1690 auto className = Identifier(path.upToFirstOccurrenceOf(".", false, false));
1691
1692 if (className != getId())
1693 return nullptr;
1694
1695 auto id = Identifier(path.fromFirstOccurrenceOf(".", false, false));
1696
1697 if (createPolyIfAvailable)
1698 {
1699 for (const auto& item : polyNodes)
1700 {
1701 if (item.id == id)
1702 {
1703 auto newNode = item.cb(network.get(), data);
1704
1705 return newNode;
1706 }
1707 }
1708 }
1709
1710 for (const auto& item : monoNodes)
1711 {
1712 if (item.id == id)
1713 {
1714 auto newNode = item.cb(network.get(), data);
1715
1716 return newNode;
1717 }
1718 }
1719
1720 return nullptr;
1721}
1722
1723DspNetwork::SelectionUpdater::SelectionUpdater(DspNetwork& parent_) :
1724 parent(parent_)

Callers 1

createFromValueTreeMethod · 0.45

Calls 5

getIdFunction · 0.85
toStringMethod · 0.45
upToFirstOccurrenceOfMethod · 0.45
fromFirstOccurrenceOfMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected