Line data Source code
1 :
2 : /* Copyright (c) 2012, Daniel Nachbaur <danielnachbaur@gmail.com>
3 : *
4 : * This file is part of Collage <https://github.com/Eyescale/Collage>
5 : *
6 : * This library is free software; you can redistribute it and/or modify it under
7 : * the terms of the GNU Lesser General Public License version 2.1 as published
8 : * by the Free Software Foundation.
9 : *
10 : * This library is distributed in the hope that it will be useful, but WITHOUT
11 : * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 : * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 : * details.
14 : *
15 : * You should have received a copy of the GNU Lesser General Public License
16 : * along with this library; if not, write to the Free Software Foundation, Inc.,
17 : * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 : */
19 :
20 : #ifndef CO_QUEUEITEM_H
21 : #define CO_QUEUEITEM_H
22 :
23 : #include <co/dataOStream.h> // base class
24 : #include <co/types.h>
25 :
26 : namespace co
27 : {
28 : namespace detail { class QueueItem; }
29 :
30 : /**
31 : * The item of the distributed queue holding the data.
32 : *
33 : * Each enqueued item generated by QueueMaster::push() can be enhanced with
34 : * additional data in a stream-like manner. On the consumer side, the data can
35 : * be retrieved via the ObjectICommand.
36 : */
37 : class QueueItem : public DataOStream
38 : {
39 : public:
40 : /** Destruct this queue item. @version 1.0 */
41 : CO_API ~QueueItem();
42 :
43 : private:
44 : friend class QueueMaster;
45 :
46 : QueueItem( const QueueItem& rhs );
47 : explicit QueueItem( QueueMaster& master );
48 :
49 0 : void sendData( const void*, const uint64_t, const bool ) override
50 0 : { LBDONTCALL }
51 :
52 : detail::QueueItem* const _impl;
53 : };
54 :
55 : }
56 :
57 : #endif // CO_QUEUEITEM_H
|