1 /*******************************************************************************
2 3 Information only interface to a queue. Provides no methods to modify the
4 contents of the queue.
5 6 Copyright:
7 Copyright (c) 2009-2016 dunnhumby Germany GmbH.
8 All rights reserved.
9 10 License:
11 Boost Software License Version 1.0. See LICENSE_BOOST.txt for details.
12 Alternatively, this file may be distributed under the terms of the Tango
13 3-Clause BSD License (see LICENSE_BSD.txt for details).
14 15 *******************************************************************************/16 17 moduleocean.util.container.queue.model.IQueueInfo;
18 19 20 21 /*******************************************************************************
22 23 Information interface to a queue.
24 25 *******************************************************************************/26 27 publicinterfaceIQueueInfo28 {
29 /***************************************************************************
30 31 Returns:
32 the number of items in the queue
33 34 ***************************************************************************/35 36 publicsize_tlength ( );
37 38 39 /***************************************************************************
40 41 Returns:
42 number of bytes stored in queue
43 44 ***************************************************************************/45 46 publiculongused_space ( );
47 48 49 /***************************************************************************
50 51 Returns:
52 number of bytes free in queue
53 54 ***************************************************************************/55 56 publiculongfree_space ( );
57 58 59 /***************************************************************************
60 61 Returns:
62 total number of bytes used by queue (used space + free space)
63 64 ***************************************************************************/65 66 publiculongtotal_space ( );
67 68 69 /***************************************************************************
70 71 Tells whether the queue is empty.
72 73 Returns:
74 true if the queue is empty
75 76 ***************************************************************************/77 78 publicboolis_empty ( );
79 80 81 /***************************************************************************
82 83 Finds out whether the provided number of bytes will fit in the queue.
84 85 Params:
86 bytes = size of item to check
87 88 Returns:
89 true if the bytes fits, else false
90 91 ***************************************************************************/92 93 publicboolwillFit ( size_tbytes );
94 }
95