commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] r4800 - gnuradio/branches/developers/eb/mb/mblock/src/


From: eb
Subject: [Commit-gnuradio] r4800 - gnuradio/branches/developers/eb/mb/mblock/src/lib
Date: Mon, 26 Mar 2007 20:54:58 -0600 (MDT)

Author: eb
Date: 2007-03-26 20:54:58 -0600 (Mon, 26 Mar 2007)
New Revision: 4800

Modified:
   gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock.cc
   gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock.h
   gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock_impl.cc
   gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock_impl.h
Log:
added class_name attribute

Modified: gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock.cc
===================================================================
--- gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock.cc      
2007-03-27 02:38:29 UTC (rev 4799)
+++ gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock.cc      
2007-03-27 02:54:58 UTC (rev 4800)
@@ -132,6 +132,18 @@
   d_impl->set_instance_name(name);
 }
 
+std::string
+mb_mblock::class_name() const
+{
+  return d_impl->class_name();
+}
+
+void
+mb_mblock::set_class_name(const std::string name)
+{
+  d_impl->set_class_name(name);
+}
+
 mb_mblock *
 mb_mblock::parent() const
 {

Modified: gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock.h
===================================================================
--- gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock.h       
2007-03-27 02:38:29 UTC (rev 4799)
+++ gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock.h       
2007-03-27 02:54:58 UTC (rev 4800)
@@ -175,15 +175,21 @@
   int
   nconnections() const;
 
+  //! Set the class name
+  void set_class_name(const std::string name);
 
 public:
   virtual ~mb_mblock();
 
+  //! Return instance name of this block
+  std::string instance_name() const;
+
+  //! Return the class name of this block
+  std::string class_name() const;
+
+  //! Set the instance name of this block.
   void set_instance_name(const std::string name);
   
-  //! Return full name of this block
-  std::string instance_name() const;
-
   //! Return the parent of this mblock, or 0 if we're the top-level block.
   mb_mblock *parent() const;
 

Modified: gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock_impl.cc
===================================================================
--- gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock_impl.cc 
2007-03-27 02:38:29 UTC (rev 4799)
+++ gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock_impl.cc 
2007-03-27 02:54:58 UTC (rev 4800)
@@ -51,7 +51,8 @@
 ////////////////////////////////////////////////////////////////////////
 
 mb_mblock_impl::mb_mblock_impl(mb_mblock *mb)
-  : d_mb(mb), d_mb_parent(0), d_instance_name("<unknown>")
+  : d_mb(mb), d_mb_parent(0),
+    d_instance_name("<unknown>"), d_class_name("mblock")
 {
 }
 
@@ -257,3 +258,9 @@
   d_instance_name = name;
 }
 
+void
+mb_mblock_impl::set_class_name(const std::string &name)
+{
+  d_class_name = name;
+}
+

Modified: gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock_impl.h
===================================================================
--- gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock_impl.h  
2007-03-27 02:38:29 UTC (rev 4799)
+++ gnuradio/branches/developers/eb/mb/mblock/src/lib/mb_mblock_impl.h  
2007-03-27 02:54:58 UTC (rev 4800)
@@ -40,7 +40,8 @@
   mb_mblock                   *d_mb;           // pointer to our associated 
mblock
   mb_mblock                   *d_mb_parent;    // pointer to our parent
 
-  std::string                  d_instance_name;        // hierarchical name
+  std::string                  d_instance_name;    // hierarchical name
+  std::string                  d_class_name;       // name of this (derived) 
class
 
   mb_port_map_t                        d_port_map;     // our ports
   mb_comp_map_t                        d_comp_map;     // our components
@@ -147,12 +148,18 @@
   mb_msg_queue &
   msgq() { return d_msgq; }
 
-  //! Return full name of this block
+  //! Return instance name of this block
   std::string instance_name() const { return d_instance_name; }
 
-  //! Set the name of this block
+  //! Set the instance name of this block
   void set_instance_name(const std::string &name);
 
+  //! Return the class name of this block
+  std::string class_name() const { return d_class_name; }
+
+  //! Set the class name
+  void set_class_name(const std::string &name);
+
   /*!
    * \brief If bound, store endpoint from the other end of the connection.
    *





reply via email to

[Prev in Thread] Current Thread [Next in Thread]