GNU Radio C++ API
howto_square_ff.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 2004 Free Software Foundation, Inc.
4
*
5
* This file is part of GNU Radio
6
*
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 3, or (at your option)
10
* any later version.
11
*
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.
16
*
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., 51 Franklin Street,
20
* Boston, MA 02110-1301, USA.
21
*/
22
#ifndef INCLUDED_HOWTO_SQUARE_FF_H
23
#define INCLUDED_HOWTO_SQUARE_FF_H
24
25
#include <
howto_api.h
>
26
#include <
gr_block.h
>
27
28
class
howto_square_ff
;
29
30
/*
31
* We use boost::shared_ptr's instead of raw pointers for all access
32
* to gr_blocks (and many other data structures). The shared_ptr gets
33
* us transparent reference counting, which greatly simplifies storage
34
* management issues. This is especially helpful in our hybrid
35
* C++ / Python system.
36
*
37
* See http://www.boost.org/libs/smart_ptr/smart_ptr.htm
38
*
39
* As a convention, the _sptr suffix indicates a boost::shared_ptr
40
*/
41
typedef
boost::shared_ptr<howto_square_ff>
howto_square_ff_sptr
;
42
43
/*!
44
* \brief Return a shared_ptr to a new instance of howto_square_ff.
45
*
46
* To avoid accidental use of raw pointers, howto_square_ff's
47
* constructor is private. howto_make_square_ff is the public
48
* interface for creating new instances.
49
*/
50
HOWTO_API
howto_square_ff_sptr
howto_make_square_ff
();
51
52
/*!
53
* \brief square a stream of floats.
54
* \ingroup block
55
*
56
* \sa howto_square2_ff for a version that subclasses gr_sync_block.
57
*/
58
class
HOWTO_API
howto_square_ff
:
public
gr_block
59
{
60
private
:
61
// The friend declaration allows howto_make_square_ff to
62
// access the private constructor.
63
64
friend
HOWTO_API
howto_square_ff_sptr
howto_make_square_ff
();
65
66
howto_square_ff
();
// private constructor
67
68
public
:
69
~
howto_square_ff
();
// public destructor
70
71
// Where all the action really happens
72
73
int
general_work
(
int
noutput_items,
74
gr_vector_int
&ninput_items,
75
gr_vector_const_void_star
&input_items,
76
gr_vector_void_star
&output_items);
77
};
78
79
#endif
/* INCLUDED_HOWTO_SQUARE_FF_H */
gr-howto-write-a-block-cmake
include
howto_square_ff.h
Generated on Mon Jul 8 2013 21:33:00 for GNU Radio C++ API by
1.8.4