From f2dea887346acf2c7f3b7fb3f9f1bc68921422c1 Mon Sep 17 00:00:00 2001 From: kevin Date: Fri, 3 May 2024 09:21:08 -0400 Subject: [PATCH] cwFlowNet.h/cpp : network_apply_preset() now takes a --- cwFlowNet.cpp | 4 ++-- cwFlowNet.h | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cwFlowNet.cpp b/cwFlowNet.cpp index cc1402c..f0b769a 100644 --- a/cwFlowNet.cpp +++ b/cwFlowNet.cpp @@ -2061,7 +2061,7 @@ errLabel: } -cw::rc_t cw::flow::network_apply_preset( network_t& net, const char* presetLabel ) +cw::rc_t cw::flow::network_apply_preset( network_t& net, const char* presetLabel, unsigned proc_label_sfx_id ) { rc_t rc = kOkRC; const object_t* net_preset_value; @@ -2085,7 +2085,7 @@ cw::rc_t cw::flow::network_apply_preset( network_t& net, const char* presetLabel instance_t* inst; // locate the instance - if((inst = instance_find(net,inst_label,kBaseSfxId)) == nullptr ) + if((inst = instance_find(net,inst_label,proc_label_sfx_id)) == nullptr ) { rc = cwLogError(kInvalidIdRC,"The network instance '%s' refered to in network preset '%s' could not be found.",inst_label,presetLabel); goto errLabel; diff --git a/cwFlowNet.h b/cwFlowNet.h index fa35553..2901e9a 100644 --- a/cwFlowNet.h +++ b/cwFlowNet.h @@ -70,7 +70,10 @@ namespace cw return rc; } - rc_t network_apply_preset( network_t& net, const char* presetLabel ); + // 'proc_label_sfx_id' is the proc label_sfx_id to be used to identify all proc's which will + // be updated by the preset application. This is used to identify the set of procs to be updated + // for 'poly' networks. + rc_t network_apply_preset( network_t& net, const char* presetLabel, unsigned proc_label_sfx_id=kBaseSfxId ); rc_t network_apply_dual_preset( network_t& net, const char* presetLabel_0, const char* presetLabel_1, double coeff ); rc_t network_apply_preset( network_t& net, const multi_preset_selector_t& mps );