Qore Programming Language  0.8.9
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
QoreQueueHelper.h
1 /* -*- mode: c++; indent-tabs-mode: nil -*- */
2 /*
3  QoreQueueHelper.h
4 
5  Qore Programming Language
6 
7  Copyright 2003 - 2013 David Nichols
8 
9  This library is free software; you can redistribute it and/or
10  modify it under the terms of the GNU Lesser General Public
11  License as published by the Free Software Foundation; either
12  version 2.1 of the License, or (at your option) any later version.
13 
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public
20  License along with this library; if not, write to the Free Software
21  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 */
23 
24 #ifndef _QORE_QOREQUEUEHELPER_H
25 
26 #define _QORE_QOREQUEUEHELPER_H
27 
28 class QoreQueueHelper : QorePrivateObjectAccessHelper {
29 protected:
30 
31 public:
33 
36  DLLEXPORT QoreQueueHelper(QoreObject* obj, ExceptionSink* xs);
37 
39  DLLEXPORT ~QoreQueueHelper();
40 
42  DLLEXPORT void push(ExceptionSink* xsink, const AbstractQoreNode* n, int timeout_ms = 0, bool* to = 0);
43 
45  DLLEXPORT void insert(ExceptionSink* xsink, const AbstractQoreNode* n, int timeout_ms = 0, bool* to = 0);
46 
48  DLLEXPORT AbstractQoreNode* shift(ExceptionSink* xsink, int timeout_ms = 0, bool* to = 0);
49 
51  DLLEXPORT AbstractQoreNode* pop(ExceptionSink* xsink, int timeout_ms = 0, bool* to = 0);
52 
54  DLLEXPORT int size() const;
55 
57  DLLEXPORT int getMax() const;
58 
60  DLLEXPORT unsigned getReadWaiting() const;
61 
63  DLLEXPORT unsigned getWriteWaiting() const;
64 
66  DLLEXPORT void clear(ExceptionSink* xsink);
67 };
68 
69 #endif // _QORE_QOREQUEUEHELPER_H
The base class for all value and parse types in Qore expression trees.
Definition: AbstractQoreNode.h:47
the implementation of Qore's object data type, reference counted, dynamically-allocated only ...
Definition: QoreObject.h:56
container for holding Qore-language exception information and also for registering a "thread_exit" ca...
Definition: ExceptionSink.h:35