source: NonGTP/Boost/boost/wave/cpplexer/re2clex/aq.hpp @ 857

Revision 857, 1.6 KB checked in by igarcia, 19 years ago (diff)
RevLine 
[857]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///////////////////////////////////////////////////////////////////////////////
18namespace boost {
19namespace wave {
20namespace cpplexer {
21namespace re2clex {
22
23typedef std::size_t aq_stdelement;
24
25typedef 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
34typedef aq_queuetype* aq_queue;
35
36int aq_enqueue(aq_queue q, aq_stdelement e);
37int aq_enqueue_front(aq_queue q, aq_stdelement e);
38int aq_serve(aq_queue q, aq_stdelement *e);
39int aq_pop(aq_queue q);
40#define AQ_EMPTY(q) (q->size == 0)
41#define AQ_FULL(q) (q->size == q->max_size)
42aq_queue aq_create(void);
43void aq_terminate(aq_queue q);
44int 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.