diff options
Diffstat (limited to 'gr-blocks/include/gnuradio/blocks/vector_sink.h')
-rw-r--r-- | gr-blocks/include/gnuradio/blocks/vector_sink.h | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/gr-blocks/include/gnuradio/blocks/vector_sink.h b/gr-blocks/include/gnuradio/blocks/vector_sink.h index 581e0be970..c180bd5e53 100644 --- a/gr-blocks/include/gnuradio/blocks/vector_sink.h +++ b/gr-blocks/include/gnuradio/blocks/vector_sink.h @@ -29,42 +29,42 @@ #include <cstdint> namespace gr { - namespace blocks { +namespace blocks { + +/*! + * \brief T sink that writes to a vector + * \ingroup debug_tools_blk + */ +template <class T> +class BLOCKS_API vector_sink : virtual public sync_block +{ +public: + // gr::blocks::vector_sink::sptr + typedef boost::shared_ptr<vector_sink<T>> sptr; /*! - * \brief T sink that writes to a vector - * \ingroup debug_tools_blk + * \brief Make a new instance of the vector source, and return a shared pointer to it. + * \param vlen length of vector items + * \param reserve_items reserve space in the internal storage for this many items; + * the internal storage will still grow to accommodate more item + * if necessary, but setting this to a realistic value can avoid + * memory allocations during runtime, especially if you know a + * priori how many items you're going to store. */ -template<class T> - class BLOCKS_API vector_sink : virtual public sync_block - { - public: - // gr::blocks::vector_sink::sptr - typedef boost::shared_ptr< vector_sink<T> > sptr; - - /*! - * \brief Make a new instance of the vector source, and return a shared pointer to it. - * \param vlen length of vector items - * \param reserve_items reserve space in the internal storage for this many items; - * the internal storage will still grow to accommodate more item - * if necessary, but setting this to a realistic value can avoid - * memory allocations during runtime, especially if you know a - * priori how many items you're going to store. - */ - static sptr make(const unsigned int vlen = 1, const int reserve_items = 1024); + static sptr make(const unsigned int vlen = 1, const int reserve_items = 1024); - //! Clear the data and tags containers. - virtual void reset() = 0; - virtual std::vector<T> data() const = 0; - virtual std::vector<tag_t> tags() const = 0; - }; + //! Clear the data and tags containers. + virtual void reset() = 0; + virtual std::vector<T> data() const = 0; + virtual std::vector<tag_t> tags() const = 0; +}; typedef vector_sink<std::uint8_t> vector_sink_b; typedef vector_sink<std::int16_t> vector_sink_s; typedef vector_sink<std::int32_t> vector_sink_i; typedef vector_sink<float> vector_sink_f; typedef vector_sink<gr_complex> vector_sink_c; - } /* namespace blocks */ +} /* namespace blocks */ } /* namespace gr */ #endif /* VECTOR_SINK_H */ |