summaryrefslogtreecommitdiff
path: root/lib/block_config.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/block_config.cpp')
-rw-r--r--lib/block_config.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/block_config.cpp b/lib/block_config.cpp
index 165ab47..227ae08 100644
--- a/lib/block_config.cpp
+++ b/lib/block_config.cpp
@@ -11,6 +11,33 @@ GlobalBlockConfig::GlobalBlockConfig(void)
interruptible_work = false;
}
+void GlobalBlockConfig::merge(const GlobalBlockConfig &config)
+{
+ //overwrite with config's max items only if maxium_items is not set (zero)
+ if (this->maximum_output_items == 0)
+ {
+ this->maximum_output_items = config.maximum_output_items;
+ }
+
+ //overwrite with config's node affinity setting for buffers if not set
+ if (this->buffer_affinity == -1)
+ {
+ this->buffer_affinity = config.buffer_affinity;
+ }
+
+ //overwrite with config's interruptable setting for work if not set
+ if (this->interruptible_work == false)
+ {
+ this->interruptible_work = config.interruptible_work;
+ }
+
+ //overwrite with config's thread pool for actor if not set
+ if (not this->thread_pool)
+ {
+ this->thread_pool = config.thread_pool;
+ }
+}
+
InputPortConfig::InputPortConfig(void)
{
item_size = 1;