• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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-2012 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(BOOST_AQ_HPP_A21D9145_B643_44C0_81E7_DB346DD67EE1_INCLUDED)
13 #define BOOST_AQ_HPP_A21D9145_B643_44C0_81E7_DB346DD67EE1_INCLUDED
14 
15 #include <boost/wave/wave_config.hpp>
16 #include <cstdlib>
17 
18 // this must occur after all of the includes and before any code appears
19 #ifdef BOOST_HAS_ABI_HEADERS
20 #include BOOST_ABI_PREFIX
21 #endif
22 
23 ///////////////////////////////////////////////////////////////////////////////
24 namespace boost {
25 namespace wave {
26 namespace cpplexer {
27 namespace re2clex {
28 
29 typedef std::size_t aq_stdelement;
30 
31 typedef struct tag_aq_queuetype
32 {
33     std::size_t head;
34     std::size_t tail;
35     std::size_t size;
36     std::size_t max_size;
37     aq_stdelement* queue;
38 } aq_queuetype;
39 
40 typedef aq_queuetype* aq_queue;
41 
42 BOOST_WAVE_DECL int aq_enqueue(aq_queue q, aq_stdelement e);
43 int aq_enqueue_front(aq_queue q, aq_stdelement e);
44 int aq_serve(aq_queue q, aq_stdelement *e);
45 BOOST_WAVE_DECL int aq_pop(aq_queue q);
46 #define AQ_EMPTY(q) (q->size == 0)
47 #define AQ_FULL(q) (q->size == q->max_size)
48 int aq_grow(aq_queue q);
49 
50 BOOST_WAVE_DECL aq_queue aq_create(void);
51 BOOST_WAVE_DECL void aq_terminate(aq_queue q);
52 
53 ///////////////////////////////////////////////////////////////////////////////
54 }   // namespace re2clex
55 }   // namespace cpplexer
56 }   // namespace wave
57 }   // namespace boost
58 
59 // the suffix header occurs after all of the code
60 #ifdef BOOST_HAS_ABI_HEADERS
61 #include BOOST_ABI_SUFFIX
62 #endif
63 
64 #endif // !defined(BOOST_AQ_HPP_A21D9145_B643_44C0_81E7_DB346DD67EE1_INCLUDED)
65