3 * Copyright 2004 Free Software Foundation, Inc.
5 * This file is part of GNU Radio
7 * GNU Radio is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2, or (at your option)
12 * GNU Radio is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with GNU Radio; see the file COPYING. If not, write to
19 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
22 #ifndef INCLUDED_HOWTO_SQUARE_FF_H
23 #define INCLUDED_HOWTO_SQUARE_FF_H
27 class howto_square_ff;
30 * We use boost::shared_ptr's instead of raw pointers for all access
31 * to gr_blocks (and many other data structures). The shared_ptr gets
32 * us transparent reference counting, which greatly simplifies storage
33 * management issues. This is especially helpful in our hybrid
34 * C++ / Python system.
36 * See http://www.boost.org/libs/smart_ptr/smart_ptr.htm
38 * As a convention, the _sptr suffix indicates a boost::shared_ptr
40 typedef boost::shared_ptr<howto_square_ff> howto_square_ff_sptr;
43 * \brief Return a shared_ptr to a new instance of howto_square_ff.
45 * To avoid accidental use of raw pointers, howto_square_ff's
46 * constructor is private. howto_make_square_ff is the public
47 * interface for creating new instances.
49 howto_square_ff_sptr howto_make_square_ff ();
52 * \brief square a stream of floats.
55 * \sa howto_square2_ff for a version that subclasses gr_sync_block.
57 class howto_square_ff : public gr_block
60 // The friend declaration allows howto_make_square_ff to
61 // access the private constructor.
63 friend howto_square_ff_sptr howto_make_square_ff ();
65 howto_square_ff (); // private constructor
68 ~howto_square_ff (); // public destructor
70 // Where all the action really happens
72 int general_work (int noutput_items,
73 gr_vector_int &ninput_items,
74 gr_vector_const_void_star &input_items,
75 gr_vector_void_star &output_items);
78 #endif /* INCLUDED_HOWTO_SQUARE_FF_H */