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

Method create

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

Source from the content-addressed store, hash-verified

648
649
650var DspNetwork::create(String path, String id)
651{
652 checkValid();
653
654 var existing = get(id);
655
656 if (auto existingNode = dynamic_cast<NodeBase*>(existing.getObject()))
657 return var(existingNode);
658
659 ValueTree newNodeData(PropertyIds::Node);
660
661 if (id.isEmpty())
662 {
663 String nameToUse = path.contains(".") ? path.fromFirstOccurrenceOf(".", false, false) : path;
664 StringArray unused;
665 id = getNonExistentId(nameToUse, unused);
666 }
667
668 newNodeData.setProperty(PropertyIds::ID, id, nullptr);
669 newNodeData.setProperty(PropertyIds::FactoryPath, path, nullptr);
670
671 NodeBase::Ptr newNode = createFromValueTree(isPoly, newNodeData);
672
673 return var(newNode);
674}
675
676juce::var DspNetwork::createAndAdd(String path, String id, var parent)
677{

Callers 7

CloneNodeMethod · 0.45
EntryMethod · 0.45
handlePopupMenuResultMethod · 0.45
wrapIntoChainMethod · 0.45
freezeNodeMethod · 0.45
addNodeAndCloseMethod · 0.45
ImagePreviewCreatorMethod · 0.45

Calls 7

varFunction · 0.85
getFunction · 0.50
getObjectMethod · 0.45
isEmptyMethod · 0.45
containsMethod · 0.45
fromFirstOccurrenceOfMethod · 0.45
setPropertyMethod · 0.45

Tested by

no test coverage detected