Add pmt type that wraps a gruel::msg_accepter.
[debian/gnuradio] / gruel / src / include / gruel / pmt.h
index 2403593017f52ea79265e6a632f935d932465a28..b1cb29f7c3ce5cfc7cf35ac6f28019ce24d4a374 100644 (file)
@@ -24,6 +24,7 @@
 #define INCLUDED_PMT_H
 
 #include <boost/intrusive_ptr.hpp>
+#include <boost/shared_ptr.hpp>
 #include <boost/any.hpp>
 #include <complex>
 #include <string>
 #include <iosfwd>
 #include <stdexcept>
 
+namespace gruel {
+  class msg_accepter;
+};
+
 /*!
  * This file defines a polymorphic type and the operations on it.
  *
@@ -482,6 +487,20 @@ boost::any pmt_any_ref(pmt_t obj);
 void pmt_any_set(pmt_t obj, const boost::any &any);
 
 
+/*
+ * ------------------------------------------------------------------------
+ *    msg_accepter -- pmt representation of gruel::msg_accepter
+ * ------------------------------------------------------------------------
+ */
+//! Return true if \p obj is a msg_accepter
+bool pmt_is_msg_accepter(const pmt_t &obj);
+
+//! make a msg_accepter
+pmt_t pmt_make_msg_accepter(boost::shared_ptr<gruel::msg_accepter> ma);
+
+//! Return underlying msg_accepter
+boost::shared_ptr<gruel::msg_accepter> pmt_msg_accepter_ref(const pmt_t &obj);
+
 /*
  * ------------------------------------------------------------------------
  *                       General functions