Line | |
---|
1 | /*=============================================================================
|
---|
2 | Boost.Wave: A Standard compliant C++ preprocessor library
|
---|
3 |
|
---|
4 | http://www.boost.org/
|
---|
5 |
|
---|
6 | Copyright (c) 2001 Daniel C. Nuffer.
|
---|
7 | Copyright (c) 2001-2005 Hartmut Kaiser.
|
---|
8 | Distributed under the Boost Software License, Version 1.0. (See accompanying
|
---|
9 | file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
---|
10 | =============================================================================*/
|
---|
11 |
|
---|
12 | #if !defined(AQ_HPP_A21D9145_B643_44C0_81E7_DB346DD67EE1_INCLUDED)
|
---|
13 | #define AQ_HPP_A21D9145_B643_44C0_81E7_DB346DD67EE1_INCLUDED
|
---|
14 |
|
---|
15 | #include <cstdlib>
|
---|
16 |
|
---|
17 | ///////////////////////////////////////////////////////////////////////////////
|
---|
18 | namespace boost {
|
---|
19 | namespace wave {
|
---|
20 | namespace cpplexer {
|
---|
21 | namespace re2clex {
|
---|
22 |
|
---|
23 | typedef std::size_t aq_stdelement;
|
---|
24 |
|
---|
25 | typedef struct tag_aq_queuetype
|
---|
26 | {
|
---|
27 | std::size_t head;
|
---|
28 | std::size_t tail;
|
---|
29 | std::size_t size;
|
---|
30 | std::size_t max_size;
|
---|
31 | aq_stdelement* queue;
|
---|
32 | } aq_queuetype;
|
---|
33 |
|
---|
34 | typedef aq_queuetype* aq_queue;
|
---|
35 |
|
---|
36 | int aq_enqueue(aq_queue q, aq_stdelement e);
|
---|
37 | int aq_enqueue_front(aq_queue q, aq_stdelement e);
|
---|
38 | int aq_serve(aq_queue q, aq_stdelement *e);
|
---|
39 | int aq_pop(aq_queue q);
|
---|
40 | #define AQ_EMPTY(q) (q->size == 0)
|
---|
41 | #define AQ_FULL(q) (q->size == q->max_size)
|
---|
42 | aq_queue aq_create(void);
|
---|
43 | void aq_terminate(aq_queue q);
|
---|
44 | int aq_grow(aq_queue q);
|
---|
45 |
|
---|
46 | ///////////////////////////////////////////////////////////////////////////////
|
---|
47 | } // namespace re2clex
|
---|
48 | } // namespace cpplexer
|
---|
49 | } // namespace wave
|
---|
50 | } // namespace boost
|
---|
51 |
|
---|
52 | #endif // !defined(AQ_HPP_A21D9145_B643_44C0_81E7_DB346DD67EE1_INCLUDED)
|
---|
Note: See
TracBrowser
for help on using the repository browser.