summaryrefslogtreecommitdiff
path: root/lib/block.cpp
diff options
context:
space:
mode:
authorJosh Blum2012-11-12 00:58:52 -0800
committerJosh Blum2012-11-12 00:58:52 -0800
commit502b13e296cb7d7a20ed8b7dc202bbe9b4e607b1 (patch)
tree4398d8afe1c5e0760a733281f44af306123ecb21 /lib/block.cpp
parentbe29a706ae227628b2e4a952f6aae97c9c66d5da (diff)
downloadsandhi-502b13e296cb7d7a20ed8b7dc202bbe9b4e607b1.tar.gz
sandhi-502b13e296cb7d7a20ed8b7dc202bbe9b4e607b1.tar.bz2
sandhi-502b13e296cb7d7a20ed8b7dc202bbe9b4e607b1.zip
more get methods for all
Diffstat (limited to 'lib/block.cpp')
-rw-r--r--lib/block.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/block.cpp b/lib/block.cpp
index cc22508..ee7142c 100644
--- a/lib/block.cpp
+++ b/lib/block.cpp
@@ -63,7 +63,7 @@ typename V::value_type vector_get(const V &v, const size_t index)
return v[index];
}
-InputPortConfig Block::input_config(const size_t which_input) const
+InputPortConfig Block::get_input_config(const size_t which_input) const
{
return vector_get((*this)->block->input_configs, which_input);
}
@@ -75,7 +75,7 @@ void Block::set_input_config(const size_t which_input, const InputPortConfig &co
(*this)->block->Push(UpdateInputsMessage(), Theron::Address());
}
-OutputPortConfig Block::output_config(const size_t which_output) const
+OutputPortConfig Block::get_output_config(const size_t which_output) const
{
return vector_get((*this)->block->output_configs, which_output);
}
@@ -97,12 +97,12 @@ void Block::produce(const size_t which_output, const size_t num_items)
(*this)->block->produce(which_output, num_items);
}
-item_index_t Block::num_items_consumed(const size_t which_input)
+item_index_t Block::get_consumed(const size_t which_input)
{
return (*this)->block->items_consumed[which_input];
}
-item_index_t Block::num_items_produced(const size_t which_output)
+item_index_t Block::get_produced(const size_t which_output)
{
return (*this)->block->items_produced[which_output];
}
@@ -118,6 +118,11 @@ TagIter Block::get_input_tags(const size_t which_input)
return TagIter(input_tags.begin(), input_tags.end());
}
+void Block::erase_input_tags(const size_t which_input)
+{
+ (*this)->block->input_tags[which_input].clear();
+}
+
void Block::propagate_tags(const size_t, const TagIter &)
{
//NOP