diff options
author | Josh Blum | 2013-09-09 00:01:07 -0700 |
---|---|---|
committer | Josh Blum | 2013-09-09 00:01:07 -0700 |
commit | f9c0d4c2e39aa28cc501ceb6479afc32f7849b11 (patch) | |
tree | 63a6677b3d4051c8a7776515ec733f6d475d1a15 /lib/hier_block.cpp | |
parent | 7c4911c28c28305ed4d1aab9b5ea82f96b49f404 (diff) | |
download | sandhi-f9c0d4c2e39aa28cc501ceb6479afc32f7849b11.tar.gz sandhi-f9c0d4c2e39aa28cc501ceb6479afc32f7849b11.tar.bz2 sandhi-f9c0d4c2e39aa28cc501ceb6479afc32f7849b11.zip |
gras: work on global config that works on hier
Diffstat (limited to 'lib/hier_block.cpp')
-rw-r--r-- | lib/hier_block.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/hier_block.cpp b/lib/hier_block.cpp index abbdec1..5d497de 100644 --- a/lib/hier_block.cpp +++ b/lib/hier_block.cpp @@ -3,6 +3,7 @@ #include "element_impl.hpp" #include <gras/hier_block.hpp> #include <boost/format.hpp> +#include <boost/foreach.hpp> #include <exception> using namespace gras; @@ -23,6 +24,15 @@ HierBlock::~HierBlock(void) //NOP } +void HierBlock::commit_config(void) +{ + BOOST_FOREACH(Apology::Worker *w, (*this)->topology->get_workers()) + { + BlockActor *actor = dynamic_cast<BlockActor *>(w->get_actor()); + actor->data->block->global_config().merge((*this)->global_config); + } +} + void ElementImpl::hier_block_cleanup(void) { this->topology->clear_all(); |