From 0a2cb50b6b7e50bb69df9478e49db4d77599c324 Mon Sep 17 00:00:00 2001
From: Tom Rondeau
Date: Mon, 8 Nov 2010 19:30:54 -0500
Subject: Renaming "handling_method" to "propagation_policy".

---
 gnuradio-core/src/lib/runtime/gr_block.cc          | 16 +++++-----------
 gnuradio-core/src/lib/runtime/gr_block.h           | 12 ++++++------
 gnuradio-core/src/lib/runtime/gr_block_executor.cc | 10 +++++-----
 3 files changed, 16 insertions(+), 22 deletions(-)

(limited to 'gnuradio-core/src')

diff --git a/gnuradio-core/src/lib/runtime/gr_block.cc b/gnuradio-core/src/lib/runtime/gr_block.cc
index b3e6b0edc..e595b60b8 100644
--- a/gnuradio-core/src/lib/runtime/gr_block.cc
+++ b/gnuradio-core/src/lib/runtime/gr_block.cc
@@ -37,7 +37,7 @@ gr_block::gr_block (const std::string &name,
     d_relative_rate (1.0),
     d_history(1),
     d_fixed_rate(false),
-    d_tag_handling_method(TPP_ALL_TO_ALL)
+    d_tag_propagation_policy(TPP_ALL_TO_ALL)
 {
 }
   
@@ -168,21 +168,15 @@ gr_block::get_tags_in_range(unsigned int which_output,
 }
 
 int
-gr_block::tag_handling_method()
+gr_block::tag_propagation_policy()
 {
-  return d_tag_handling_method;
+  return d_tag_propagation_policy;
 }
 
 void
-gr_block::set_tag_handling_method(int m)
+gr_block::set_tag_propagation_policy(TAG_PROPAGATION_POLICY p)
 {
-  /*
-  if((m == TAGS_ONE_TO_ONE) && (ninputs() != noutputs())) {
-    throw std::invalid_argument ("gr_block::set_handling method to ONE-TO-ONE requires ninputs == noutputs");    
-  }
-  */
-
-  d_tag_handling_method = m;
+  d_tag_propagation_policy = p;
 }
 
 std::ostream&
diff --git a/gnuradio-core/src/lib/runtime/gr_block.h b/gnuradio-core/src/lib/runtime/gr_block.h
index be39a7b95..e2f00bb6f 100644
--- a/gnuradio-core/src/lib/runtime/gr_block.h
+++ b/gnuradio-core/src/lib/runtime/gr_block.h
@@ -63,7 +63,7 @@ class gr_block : public gr_basic_block {
     WORK_DONE = -1
   };
 
-  enum TAG_PROPOGATION_POLICY {
+  enum TAG_PROPAGATION_POLICY {
     TPP_DONT = 0,
     TPP_ALL_TO_ALL = 1,
     TPP_ONE_TO_ONE = 2
@@ -215,14 +215,14 @@ class gr_block : public gr_basic_block {
   uint64_t nitems_written(unsigned int which_output);
 
   /*!
-   * \brief Asks for the method used by the scheduler to moved tags downstream.
+   * \brief Asks for the policy used by the scheduler to moved tags downstream.
    */
-  int tag_handling_method();
+  int tag_propagation_policy();
 
   /*!
-   * \brief Used by the scheduler to determine how tags are moved downstream.
+   * \brief Set the policy by the scheduler to determine how tags are moved downstream.
    */
-  void set_tag_handling_method(int m);
+  void set_tag_propagation_policy(TAG_PROPAGATION_POLICY p);
 
   // ----------------------------------------------------------------------------
 
@@ -233,7 +233,7 @@ class gr_block : public gr_basic_block {
   gr_block_detail_sptr	d_detail;		// implementation details
   unsigned              d_history;
   bool                  d_fixed_rate;
-  int                   d_tag_handling_method;
+  TAG_PROPAGATION_POLICY d_tag_propagation_policy; // policy for moving tags downstream
     
  protected:
 
diff --git a/gnuradio-core/src/lib/runtime/gr_block_executor.cc b/gnuradio-core/src/lib/runtime/gr_block_executor.cc
index c43f22895..35aa8cf1e 100644
--- a/gnuradio-core/src/lib/runtime/gr_block_executor.cc
+++ b/gnuradio-core/src/lib/runtime/gr_block_executor.cc
@@ -309,10 +309,10 @@ gr_block_executor::run_one_iteration()
     // Move tags downstream
     // if a sink, we don't need to move downstream;
     // and do not bother if block uses TAGS_NONE attribute
-    if(!d->sink_p() && (m->tag_handling_method() != gr_block::TPP_DONT)) { 
+    if(!d->sink_p() && (m->tag_propagation_policy() != gr_block::TPP_DONT)) { 
 
       // every tag on every input propogates to everyone downstream
-      if(m->tag_handling_method() == gr_block::TPP_ALL_TO_ALL) {
+      if(m->tag_propagation_policy() == gr_block::TPP_ALL_TO_ALL) {
 	for(int i = 0; i < d->ninputs(); i++) {
 	  std::vector<pmt::pmt_t> tuple = d->get_tags_in_range(i, d_start_nitems_read[i], d->nitems_read(i));
 	  std::vector<pmt::pmt_t>::iterator t;
@@ -325,8 +325,8 @@ gr_block_executor::run_one_iteration()
 
       // tags from input i only go to output i
       // this requires d->ninputs() == d->noutputs; this is checked when this
-      // type of tag-handling system is selected in gr_block_detail
-      else if(m->tag_handling_method() == gr_block::TPP_ONE_TO_ONE) {
+      // type of tag-propagation system is selected in gr_block_detail
+      else if(m->tag_propagation_policy() == gr_block::TPP_ONE_TO_ONE) {
 	if(d->ninputs() == d->noutputs()) {
 	  for(int i = 0; i < d->ninputs(); i++) {
 	    std::vector<pmt::pmt_t> tuple = d->get_tags_in_range(i, d_start_nitems_read[i], d->nitems_read(i));
@@ -337,7 +337,7 @@ gr_block_executor::run_one_iteration()
 	  }
 	}
 	else 
-	  throw std::invalid_argument ("handling method 'ONE-TO-ONE' requires ninputs == noutputs");
+	  throw std::invalid_argument ("propagation_policy 'ONE-TO-ONE' requires ninputs == noutputs");
       }
 
       // else ; do nothing
-- 
cgit