1 | /////////////////////////////////////////////////////////////////////////////// |
---|---|
2 | // |
3 | // (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost |
4 | // Software License, Version 1.0. (See accompanying file |
5 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) |
6 | // |
7 | // See http://www.boost.org/libs/container for documentation. |
8 | // |
9 | /////////////////////////////////////////////////////////////////////////////// |
10 | |
11 | #ifndef BOOST_CONTAINER_ALLOCATION_TYPE_HPP |
12 | #define BOOST_CONTAINER_ALLOCATION_TYPE_HPP |
13 | |
14 | #ifndef BOOST_CONFIG_HPP |
15 | # include <boost/config.hpp> |
16 | #endif |
17 | |
18 | #if defined(BOOST_HAS_PRAGMA_ONCE) |
19 | # pragma once |
20 | #endif |
21 | |
22 | #include <boost/container/detail/config_begin.hpp> |
23 | #include <boost/container/detail/workaround.hpp> |
24 | |
25 | namespace boost { |
26 | namespace container { |
27 | |
28 | #ifndef BOOST_CONTAINER_DOXYGEN_INVOKED |
29 | enum allocation_type_v |
30 | { |
31 | // constants for allocation commands |
32 | allocate_new_v = 0x01, |
33 | expand_fwd_v = 0x02, |
34 | expand_bwd_v = 0x04, |
35 | // expand_both = expand_fwd | expand_bwd, |
36 | // expand_or_new = allocate_new | expand_both, |
37 | shrink_in_place_v = 0x08, |
38 | nothrow_allocation_v = 0x10, |
39 | zero_memory_v = 0x20, |
40 | try_shrink_in_place_v = 0x40 |
41 | }; |
42 | |
43 | typedef unsigned int allocation_type; |
44 | #endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED |
45 | static const allocation_type allocate_new = (allocation_type)allocate_new_v; |
46 | static const allocation_type expand_fwd = (allocation_type)expand_fwd_v; |
47 | static const allocation_type expand_bwd = (allocation_type)expand_bwd_v; |
48 | static const allocation_type shrink_in_place = (allocation_type)shrink_in_place_v; |
49 | static const allocation_type try_shrink_in_place= (allocation_type)try_shrink_in_place_v; |
50 | static const allocation_type nothrow_allocation = (allocation_type)nothrow_allocation_v; |
51 | static const allocation_type zero_memory = (allocation_type)zero_memory_v; |
52 | |
53 | } //namespace container { |
54 | } //namespace boost { |
55 | |
56 | #include <boost/container/detail/config_end.hpp> |
57 | |
58 | #endif //BOOST_CONTAINER_ALLOCATION_TYPE_HPP |
59 |