Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: downloads/boost_1_34_1/boost/wave/cpplexer/re2clex/aq.hpp @ 29

Last change on this file since 29 was 29, checked in by landauf, 17 years ago

updated boost from 1_33_1 to 1_34_1

File size: 1.9 KB
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-2007 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 <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///////////////////////////////////////////////////////////////////////////////
24namespace boost {
25namespace wave {
26namespace cpplexer {
27namespace re2clex {
28
29typedef std::size_t aq_stdelement;
30
31typedef 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
40typedef aq_queuetype* aq_queue;
41
42int aq_enqueue(aq_queue q, aq_stdelement e);
43int aq_enqueue_front(aq_queue q, aq_stdelement e);
44int aq_serve(aq_queue q, aq_stdelement *e);
45int aq_pop(aq_queue q);
46#define AQ_EMPTY(q) (q->size == 0)
47#define AQ_FULL(q) (q->size == q->max_size)
48int aq_grow(aq_queue q);
49
50BOOST_WAVE_DECL aq_queue aq_create(void);
51BOOST_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(AQ_HPP_A21D9145_B643_44C0_81E7_DB346DD67EE1_INCLUDED)
Note: See TracBrowser for help on using the repository browser.