GNU Radio's OsmoSDR Package
osmosdr_snk_c.h
Go to the documentation of this file.
1
/* -*- c++ -*- */
2
/*
3
* Copyright 2012 Dimitri Stolnikov <horiz0n@gmx.net>
4
*
5
* GNU Radio is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 3, or (at your option)
8
* any later version.
9
*
10
* GNU Radio is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with GNU Radio; see the file COPYING. If not, write to
17
* the Free Software Foundation, Inc., 51 Franklin Street,
18
* Boston, MA 02110-1301, USA.
19
*/
20
#ifndef INCLUDED_OSMOSDR_SNK_C_H
21
#define INCLUDED_OSMOSDR_SNK_C_H
22
23
#include <gr_hier_block2.h>
24
25
class
osmosdr_snk_c
;
26
27
/*
28
* We use boost::shared_ptr's instead of raw pointers for all access
29
* to gr_blocks (and many other data structures). The shared_ptr gets
30
* us transparent reference counting, which greatly simplifies storage
31
* management issues. This is especially helpful in our hybrid
32
* C++ / Python system.
33
*
34
* See http://www.boost.org/libs/smart_ptr/smart_ptr.htm
35
*
36
* As a convention, the _sptr suffix indicates a boost::shared_ptr
37
*/
38
typedef
boost::shared_ptr<osmosdr_snk_c> osmosdr_snk_c_sptr;
39
40
/*!
41
* \brief Return a shared_ptr to a new instance of osmosdr_snk_c.
42
*
43
* To avoid accidental use of raw pointers, osmosdr_snk_c's
44
* constructor is private. osmosdr_make_snk_c is the public
45
* interface for creating new instances.
46
*/
47
osmosdr_snk_c_sptr
osmosdr_make_snk_c
(
const
std::string & args =
""
);
48
49
/*!
50
* \brief Takes a stream of complex samples.
51
* \ingroup block
52
*
53
* This uses the preferred technique: subclassing gr_hier_block2.
54
*/
55
class
osmosdr_snk_c
:
56
public
gr_hier_block2
57
{
58
private
:
59
// The friend declaration allows osmosdr_make_snk_c to
60
// access the private constructor.
61
62
friend
osmosdr_snk_c_sptr
osmosdr_make_snk_c
(
const
std::string & args);
63
64
/*!
65
* \brief Takes a stream of complex samples.
66
*/
67
osmosdr_snk_c
(
const
std::string & args);
// private constructor
68
69
public
:
70
~osmosdr_snk_c
();
// public destructor
71
72
};
73
74
#endif
/* INCLUDED_OSMOSDR_SNK_C_H */
lib
osmosdr
osmosdr_snk_c.h
Generated by
1.8.3.1