diff options
author | Josh Blum | 2012-11-01 00:24:49 -0700 |
---|---|---|
committer | Josh Blum | 2012-11-01 00:24:49 -0700 |
commit | bbd292bdf0c8b7e3c582e0d9766f51f108a17172 (patch) | |
tree | 79b678184793f0bac15207180128e9f23f9059cb /lib | |
parent | af7a69de61ee641d9faaf5215eb68e0980ff1ead (diff) | |
download | sandhi-bbd292bdf0c8b7e3c582e0d9766f51f108a17172.tar.gz sandhi-bbd292bdf0c8b7e3c582e0d9766f51f108a17172.tar.bz2 sandhi-bbd292bdf0c8b7e3c582e0d9766f51f108a17172.zip |
added deprecated max items interface to tb
Diffstat (limited to 'lib')
-rw-r--r-- | lib/top_block.cpp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/top_block.cpp b/lib/top_block.cpp index b82f603..c321612 100644 --- a/lib/top_block.cpp +++ b/lib/top_block.cpp @@ -144,3 +144,29 @@ bool TopBlock::wait(const double timeout) return (*this)->token.unique(); } + +///////////////////////// Deprecated interfaces //////////////////////// + +void TopBlock::start(const size_t max_items) +{ + this->set_max_noutput_items(max_items); + this->start(); +} + +void TopBlock::run(const size_t max_items) +{ + this->set_max_noutput_items(max_items); + this->run(); +} + +int TopBlock::max_noutput_items(void) const +{ + return this->global_config().maximum_output_items; +} + +void TopBlock::set_max_noutput_items(int max_items) +{ + gras::GlobalBlockConfig config = this->global_config(); + config.maximum_output_items = max_items; + this->set_global_config(config); +} |