From 29c73e79ef50525b56d8e9f89808baace75fae82 Mon Sep 17 00:00:00 2001 From: eb Date: Sat, 13 Jan 2007 06:39:33 +0000 Subject: Merged latest pmt and mblock into trunk (eb/wip -r4262:4268) git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@4269 221aa14e-8319-0410-a670-987f0aec2ac5 --- mblock/src/lib/mb_protocol_class.h | 38 +++++++++----------------------------- 1 file changed, 9 insertions(+), 29 deletions(-) (limited to 'mblock/src/lib/mb_protocol_class.h') diff --git a/mblock/src/lib/mb_protocol_class.h b/mblock/src/lib/mb_protocol_class.h index 771a63e09..f4382ada1 100644 --- a/mblock/src/lib/mb_protocol_class.h +++ b/mblock/src/lib/mb_protocol_class.h @@ -23,40 +23,20 @@ #include -// FIXME maybe this should just be a pmt_t aggregate??? - -class mb_protocol_class; -typedef boost::shared_ptr mb_protocol_class_sptr; - /*! - * \brief construct a protocol_class and return boost::shared_ptr + * \brief construct a protocol_class * * \param name the name of the class (symbol) - * \param incoming incoming message set (dict: keys are message types) - * \param outgoing outgoing message set (dict: keys are message types) + * \param incoming incoming message set (list of symbols) + * \param outgoing outgoing message set (list of symbols) */ -mb_protocol_class_sptr -mb_make_protocol_class(pmt_t name, pmt_t incoming, pmt_t outgoing); - -class mb_protocol_class { - pmt_t d_name; - pmt_t d_incoming; - pmt_t d_outgoing; - - friend mb_protocol_class_sptr - mb_make_protocol_class(pmt_t name, pmt_t incoming, pmt_t outgoing); - - // private constructor - mb_protocol_class(pmt_t name, pmt_t incoming, pmt_t outgoing); - -public: - ~mb_protocol_class(); +pmt_t mb_make_protocol_class(pmt_t name, pmt_t incoming, pmt_t outgoing); - pmt_t name() const { return d_name; } - pmt_t incoming() const { return d_incoming; } - pmt_t outgoing() const { return d_outgoing; } +// Accessors +pmt_t mb_protocol_class_name(pmt_t pc); //< return name of protocol class +pmt_t mb_protocol_class_incoming(pmt_t pc); //< return incoming message set +pmt_t mb_protocol_class_outgoing(pmt_t pc); //< return outgoing message set - mb_protocol_class_sptr conj() const; // return the conjugate of this protocol class -}; +pmt_t mb_protocol_class_lookup(pmt_t name); //< lookup an existing protocol class by name #endif /* INCLUDED_MB_PROTOCOL_CLASS_H */ -- cgit