/* -*- c++ -*- */
/*
- * Copyright 2004 Free Software Foundation, Inc.
+ * Copyright 2004,2009 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
#include <gr_sync_block.h>
#include <stddef.h> // size_t
+class gr_head;
+typedef boost::shared_ptr<gr_head> gr_head_sptr;
+
/*!
* \brief copies the first N items to the output then signals done
* \ingroup slicedice_blk
class gr_head : public gr_sync_block
{
- friend gr_block_sptr gr_make_head (size_t sizeof_stream_item, int nitems);
- gr_head (size_t sizeof_stream_item, int nitems);
+ friend gr_head_sptr gr_make_head (size_t sizeof_stream_item, unsigned long long nitems);
+ gr_head (size_t sizeof_stream_item, unsigned long long nitems);
- int d_nitems;
- int d_ncopied_items;
+ unsigned long long d_nitems;
+ unsigned long long d_ncopied_items;
public:
int work (int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items);
+
+ void reset() { d_ncopied_items = 0; }
};
-gr_block_sptr
-gr_make_head (size_t sizeof_stream_item, int nitems);
+gr_head_sptr
+gr_make_head (size_t sizeof_stream_item, unsigned long long nitems);
#endif /* INCLUDED_GR_HEAD_H */